classFinding
final class Finding
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
One thing worth reporting about a catalogued statement.
Properties§
public FindingRule $rulepublic Severity $severitypublic string $messageMethods§
public function __construct(
public FindingRule $rule,
public Severity $severity,
public string $message,
)Parameters
$rule | FindingRule | What the finding is about |
$severity | Severity | How much attention it deserves |
$message | string | What to tell the reader |
public static function of(FindingRule $rule, string $message): selfA finding at the rule's own severity.
Parameters
$rule | FindingRule | |
$message | string |
Returns
selfTest cases 41
CatalogEntryTest::testHasFindingLooksForOneRulecallsCatalogEntryTest::testSeverityIsTheHighestOfTheFindingscallsFindingTest::testOfTakesTheSeverityOfTheRulecallsCatalogFilterTest::testMatchesSeverityKeepsWhatIsAtLeastAsSeverecallsCatalogIndexTest::testByRuleListsTheMostReportedRuleFirstcallsCatalogIndexTest::testHotspotsKeepCountingPastAStatementNothingWasReportedOncallsCatalogIndexTest::testHotspotsRankFunctionsByWhatWasReportedcallsCatalogIndexTest::testUsageCountsReadsWritesSchemaAndAttentioncallsCatalogStatisticsTest::testAtLeastCountsTheStatementsWorthLookingAtcallsCatalogStatisticsTest::testByRuleCountsTheFindingsMostFirstcallsCatalogStatisticsTest::testFilesSayWhatWasFoundInEachOfThemcallsCatalogStatisticsTest::testFindingsCountsEveryFindingOfEveryStatementcallsCatalogStatisticsTest::testFlaggedListsTheReportedStatementsWorstFirstcallsHtmlReporterTest::testRenderLinksEveryRouteToTheStatementsPagecallsHtmlReporterTest::testRenderWritesTheWholeSiteOfPagescallsClassPageTest::testRenderIsWrittenExactlycallsFileIndexPageTest::testRenderIsWrittenExactlycallsFilePageTest::testRenderIsWrittenExactlycallsFindingPageTest::testAnchorsNameTheHotspotsAndEveryRulecallsFindingPageTest::testHotspotsLinkEachFunctionAndAreSilentWhenNothingIsFlaggedcallsFindingPageTest::testRenderIsWrittenExactlycallsFindingPageTest::testRenderOpensWithWhereToLookAndThenListsEveryRulecallsNamespacePageTest::testRenderIsWrittenExactlycallsOverviewPageTest::testAttentionListsRulesAndTheFunctionsFlaggedMostcallsOverviewPageTest::testRenderIsWrittenExactlycallsOverviewPageTest::testRenderLaysOutEveryRouteToAStatementcallsStatementIndexPageTest::testRenderIsWrittenExactlycallsStatementPageTest::testFindingsCarryTheirRuleAndSeveritycallsStatementPageTest::testRenderCarriesEverythingKnownAboutTheStatementcallsStatementPageTest::testRenderIsWrittenExactlycallsStatementPageTest::testRenderOfACallNothingWasReadFromIsWrittenExactlycallsTableIndexPageTest::testRenderIsWrittenExactlycallsTableIndexPageTest::testRowCountsHowTheTableIsUsedAndMarksAGapInItsNamecallsTablePageTest::testRenderIsWrittenExactlycallsPageShellTest::testRenderIsWrittenExactlycallsStatementListTest::testFacetsIsWrittenExactlycallsStatementListTest::testFacetsOfferOnlyWhatWouldNarrowTheListingcallsStatementRowTest::testAttributesCarryEveryFactAListingIsNarrowedBycallsStatementRowTest::testAttributesNameARuleOnceHoweverOftenItWasReportedcallsStatementRowTest::testMetaNamesTheFunctionUnlessTheListingAlreadyDoescallsStatementRowTest::testMetaOmitsWhatTheListingAlreadyStatesAndShowsWhatIsNotOrdinarycalls
Called from 7
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:221
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:224
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:231
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:240
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:246
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:249
- static-call SqlCatalog\Core\Analysis\EntryFactory::countMismatch() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:294
Calls 2
- new
selfline 31 - method-call FindingRule::severity() line 31
Test cases 57§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 55
CatalogCommandTestcallsEntryFactoryTest::testBuildOneReportsAStatementBoundWithTheWrongNumberOfValuescallsEntryFactoryTest::testBuildReportsAStatementBoundWithTheWrongNumberOfValuescallsEntryFactoryTest::testCountMismatchStaysQuietWhenTheCallSiteHasAlternativescallsEntryFactoryTest::testFindingsReportACallNotAnalyzedWithoutClaimingALimitCutItShortcallsEntryFactoryTest::testFindingsReportAnIncompleteSearchOnceEvenWhenALimitAlsoCutItShortcallsEntryFactoryTest::testFindingsReportAReadingALimitCutShortAlongsideAWrongCountcallsEntryFactoryTest::testFindingsReportAStatementBoundWithTheWrongNumberOfValuescallsEntryFactoryTest::testFindingsReportAStatementThatDidNotResolveAtAllcallsEntryFactoryTest::testFindingsReportExternalInputcallsEntryFactoryTest::testFindingsReportExternalInputOnceHoweverManyValuesCarryItcallsEntryFactoryTest::testFindingsReportThatTheSearchDidNotClosecallsCatalogEntryTest::testHasFindingLooksForOneRulecallsCatalogEntryTest::testSeverityIsTheHighestOfTheFindingscallsCatalogFilterTest::testMatchesSeverityKeepsWhatIsAtLeastAsSeverecallsAnalyzerTestcallsCatalogIndexTest::testByRuleListsTheMostReportedRuleFirstcallsCatalogIndexTest::testHotspotsKeepCountingPastAStatementNothingWasReportedOncallsCatalogIndexTest::testHotspotsRankFunctionsByWhatWasReportedcallsCatalogIndexTest::testUsageCountsReadsWritesSchemaAndAttentioncallsCatalogStatisticsTest::testAtLeastCountsTheStatementsWorthLookingAtcallsCatalogStatisticsTest::testByRuleCountsTheFindingsMostFirstcallsCatalogStatisticsTest::testFilesSayWhatWasFoundInEachOfThemcallsCatalogStatisticsTest::testFindingsCountsEveryFindingOfEveryStatementcallsCatalogStatisticsTest::testFlaggedListsTheReportedStatementsWorstFirstcallsHtmlReporterTest::testRenderLinksEveryRouteToTheStatementsPagecallsHtmlReporterTest::testRenderWritesTheWholeSiteOfPagescallsClassPageTest::testRenderIsWrittenExactlycallsFileIndexPageTest::testRenderIsWrittenExactlycallsFilePageTest::testRenderIsWrittenExactlycallsFindingPageTest::testAnchorsNameTheHotspotsAndEveryRulecallsFindingPageTest::testHotspotsLinkEachFunctionAndAreSilentWhenNothingIsFlaggedcallsFindingPageTest::testRenderIsWrittenExactlycallsFindingPageTest::testRenderOpensWithWhereToLookAndThenListsEveryRulecallsNamespacePageTest::testRenderIsWrittenExactlycallsOverviewPageTest::testAttentionListsRulesAndTheFunctionsFlaggedMostcallsOverviewPageTest::testRenderIsWrittenExactlycallsOverviewPageTest::testRenderLaysOutEveryRouteToAStatementcallsStatementIndexPageTest::testRenderIsWrittenExactlycallsStatementPageTest::testFindingsCarryTheirRuleAndSeveritycallsStatementPageTest::testRenderCarriesEverythingKnownAboutTheStatementcallsStatementPageTest::testRenderIsWrittenExactlycallsStatementPageTest::testRenderOfACallNothingWasReadFromIsWrittenExactlycallsTableIndexPageTest::testRenderIsWrittenExactlycallsTableIndexPageTest::testRowCountsHowTheTableIsUsedAndMarksAGapInItsNamecallsTablePageTest::testRenderIsWrittenExactlycallsPageShellTest::testRenderIsWrittenExactlycallsStatementListTest::testFacetsIsWrittenExactlycallsStatementListTest::testFacetsOfferOnlyWhatWouldNarrowTheListingcallsStatementRowTest::testAttributesCarryEveryFactAListingIsNarrowedBycallsStatementRowTest::testAttributesNameARuleOnceHoweverOftenItWasReportedcallsStatementRowTest::testMetaNamesTheFunctionUnlessTheListingAlreadyDoescallsStatementRowTest::testMetaOmitsWhatTheListingAlreadyStatesAndShowsWhatIsNotOrdinarycallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Static calls 7
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:221
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:224
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:231
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:240
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:246
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:249
- static-call SqlCatalog\Core\Analysis\EntryFactory::countMismatch() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:294