classFindingPage
final class FindingPage
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Everything worth reporting: where to look first, then every finding under its rule.
The question behind a finding is usually about code rather than about one statement — which functions build SQL out of values they do not control — so the page opens with the functions ranked by what was reported on them, and only then lists the statements rule by rule.
Methods§
public function __construct(
?HtmlText $text = null,
?StatementList $list = null,
?Palette $palette = null,
)Wires the page to the rendering it is written with.
Parameters
$text | ?HtmlText | |
$list | ?StatementList | |
$palette | ?Palette |
public function render(ReportSite $site): stringThe body of the findings page.
Parameters
$site | ReportSite |
Returns
stringTest cases 2
Called from 1
Calls 6
- method-call ReportSite::index() line 47
- method-call FindingPage::section() line 53
- static-call FindingRule::from() line 53
- method-call HtmlText::count() line 56
- method-call ReportSite::statistics() line 56
- method-call FindingPage::hotspots() line 60
public function hotspots(ReportSite $site): stringThe functions issuing flagged statements, worst first.
Parameters
$site | ReportSite |
Returns
stringCalled from 1
Calls 6
- method-call ReportSite::index() line 70
- method-call HtmlText::link() line 72
- static-call Scope::of() line 72
- method-call ReportSite::functionUrl() line 72
- method-call ReportSite::filePage() line 73
- method-call HtmlText::number() line 74
public function section(
ReportSite $site,
FindingRule $rule,
list<CatalogEntry> $entries,
): stringOne rule, with everything it reported.
Parameters
$site | ReportSite | |
$rule | FindingRule | |
$entries | list<CatalogEntry> |
Returns
stringTest cases 1
Called from 1
Calls 9
- method-call HtmlText::escape() line 97
- method-call HtmlText::chip() line 98
- method-call FindingRule::severity() line 98
- method-call Palette::severity() line 98
- method-call HtmlText::count() line 99
- function-call
countline 99 - method-call FindingRule::describe() line 101
- method-call StatementList::rows() line 102
- class-const ReportSite::FINDINGS() line 102
public function anchors(ReportSite $site): list<array{string, string}>The sections of the page, for the navigation.
Parameters
$site | ReportSite |
Returns
list<array{string, string}>Test cases 1
Called from 1
Calls 2
- method-call ReportSite::index() line 112
- function-call
array_keysline 113
Private surface 3§
Implementation details, listed for orientation only.
private HtmlText $textprivate StatementList $listprivate Palette $paletteTest cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
FindingPageTest::testAnchorsNameTheHotspotsAndEveryRulecallsFindingPageTest::testHotspotsLinkEachFunctionAndAreSilentWhenNothingIsFlaggedcallsFindingPageTest::testRenderIsWrittenExactlycallsFindingPageTest::testRenderOpensWithWhereToLookAndThenListsEveryRulecallsFindingPageTest::testSectionHeadsTheRuleWithItsSeverityAndMeaningcalls
Other tests reaching this symbol 2
ReporterInterfaceTestcallsHtmlReporterTestcalls