Udp.Code.Links to research reports - #715
Open
alexander-b-clean wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (3)
lib/CleantalkSP/SpbctWP/VulnerabilityAlarm/VulnerabilityAlarmView.php:535
- In this method you mostly use short array syntax (
[]), but this branch introducesarray(). Using[]here keeps the style consistent within the function.
$psc_certificates = ! empty($psc_modules) ? static::getPscCertificatesMap() : array();
lib/CleantalkSP/SpbctWP/VulnerabilityAlarm/VulnerabilityAlarmView.php:354
- The new URL-building behavior (search URL when a CVE/PSC id exists vs app fallback with optional anchor) is not covered by existing tests for this class. Adding a small unit test for getTabCriticalUpdatesData()/getResearchReportUrl() would help prevent regressions in link formats.
private static function getResearchReportUrl($module_slug, $certificate_id, $module_id = '')
lib/CleantalkSP/SpbctWP/VulnerabilityAlarm/VulnerabilityAlarmView.php:382
- This new helper returns an empty array via an
if/elseblock and uses inconsistent spacing compared to surrounding code (e.g.,if ( empty(...) )). Consider simplifying to a single return and using the same spacing/short-array style for readability.
This issue also appears on line 535 of the same file.
if (is_array($certificates)) {
return $certificates;
} else {
return array();
}
AntonV1211
requested changes
Aug 18, 2026
| private static function getResearchReportUrl($module_slug, $certificate_id, $module_id = '') | ||
| { | ||
| if ( empty($module_slug) ) { | ||
| return static::RESEARCH_SITE_URL . '/reports/'; |
Contributor
There was a problem hiding this comment.
Any links should be implemented via LinkConstructor.
Glomberg
requested changes
Aug 18, 2026
| */ | ||
| private static function getPscCertificatesMap() | ||
| { | ||
| $certificates = get_transient(static::PSC_CERTIFICATES_MAP_TRANSIENT); |
Contributor
Author
There was a problem hiding this comment.
I rewrote the function
Glomberg
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://app.doboard.com/1/task/41729