enumResolution
enum Resolution: string
How far the analyzer got with a statement, and why it got no further.
A statement that is not pinned down is not simply "unknown". Having followed a value all the way to a request parameter is a different answer from having run out of budget, both are different from not modelling the dependency at all, and all three are different from never having looked at the call. Reporting which one it is separates what the program does from what the analyzer managed to establish.
Cases§
case Resolved = 'resolved'case ExternalInput = 'external-input'case IncompleteModel = 'incomplete-model'case Incomplete = 'incomplete'case NotAnalyzed = 'not-analyzed'Methods§
public static function of(TextPattern $pattern): selfHow far the analyzer got with a statement of this shape.
Parameters
$pattern | TextPattern |
Returns
selfTest cases 3
Called from 3
- static-call SqlCatalog\Core\Analysis\EntryFactory::build() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:66
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:218
- static-call SqlCatalog\Core\Catalog\CatalogEntry::resolution() packages/sql-catalog/src/Core/Catalog/CatalogEntry.php:50
Calls 10
- method-call TextPattern::holes() line 36
- class-const Resolution::Resolved() line 40
- function-call
in_arrayline 42 - class-const Origin::Unreached() line 42
- class-const Resolution::NotAnalyzed() line 43
- class-const Origin::Budget() line 45
- class-const Resolution::Incomplete() line 46
- class-const Origin::External() line 50
- class-const Resolution::IncompleteModel() line 51
- class-const Resolution::ExternalInput() line 55
public function isResolved(): boolWhether the statement text is pinned down.
Returns
boolCalls 1
- class-const Resolution::Resolved() line 63
public function isClosed(): boolWhether the analyzer closed every dependency it set out to follow.
Reaching runtime input closes the search: the trail was followed to its end and the string simply is not fixed. Running out of budget, or not modelling a dependency, leaves the search open.
Returns
boolCalls 5
- class-const Resolution::Resolved() line 76
- class-const Resolution::ExternalInput() line 76
- class-const Resolution::IncompleteModel() line 77
- class-const Resolution::Incomplete() line 77
- class-const Resolution::NotAnalyzed() line 77
public function wasRead(): boolWhether a statement was read from the call at all.
A budget and a call nothing was read from both leave the text open for a reason about the analyzer rather than about the program, so what is left is not a statement with values spliced into it and must not be reported as one.
Returns
boolTest cases 1
Calls 5
- class-const Resolution::Resolved() line 92
- class-const Resolution::ExternalInput() line 92
- class-const Resolution::IncompleteModel() line 92
- class-const Resolution::Incomplete() line 93
- class-const Resolution::NotAnalyzed() line 93
public function describe(): stringWhat the analyzer can say about the statement, in one line.
Returns
stringTest cases 1
Calls 5
- class-const Resolution::Resolved() line 103
- class-const Resolution::ExternalInput() line 104
- class-const Resolution::IncompleteModel() line 105
- class-const Resolution::Incomplete() line 106
- class-const Resolution::NotAnalyzed() line 107
Test cases 40§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 9
ResolutionTest::providerOfcallsResolutionTest::providerWasReadcallsResolutionTest::testDescribeExplainsEveryOutcomecallsResolutionTest::testIsClosedSeparatesAFinishedSearchFromAnAbandonedOnecallsResolutionTest::testIsResolvedOnlyWhenTheTextIsPinnedDowncallsResolutionTest::testOfcallsResolutionTest::testOfAStatementWithoutGapsIsResolvedcallsResolutionTest::testOfPrefersTheStoppedSearchOverTheInputItAlsoReachedcallsResolutionTest::testWasReadSaysWhetherAStatementWasReadFromTheCallAtAllcalls
Other tests reaching this symbol 31
CatalogCommandTestcallsEntryFactoryTestcallsExpressionEvaluatorTestcallsCatalogEntryTest::testResolutionReadsHowFarTheAnalyzerGotcallsReporterInterfaceTestcallsCallModelTestcallsAnalyzerTest::testACallOnSomethingThatCouldNotBeNamedIsReportedAsUnmatchedcallsAnalyzerTest::testACallSiteSurvivesTheWalkNotReachingItcallsAnalyzerTest::testAnalyzeSourceListsTheCountAndPageStatementsOfPaginatecallsAnalyzerTest::testIssetGuardsAConditionallyAssignedSqlFragmentcallsAnalyzerTest::testIssetSqlFragmentsKeepBothSyntacticBranchescallsAnalyzerTest::testMixedExternalAndUnresolvedDependenciesDoNotCloseTheSearchcallsCatalogStatisticsTestcallsHtmlReporterTestcallsClassPageTestcallsFileIndexPageTestcallsFilePageTestcallsFindingPageTestcallsNamespacePageTestcallsOverviewPageTestcallsStatementIndexPageTestcallsStatementPageTestcallsTableIndexPageTestcallsTablePageTestcallsPageShellTestcallsPaletteTest::providerResolutioncallsSearchIndexTestcallsStatementListTestcallsStatementRowTestcallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Static calls 6
- static-call SqlCatalog\Core\Analysis\EntryFactory::build() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:66
- static-call SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:218
- static-call SqlCatalog\Core\Catalog\CatalogEntry::resolution() packages/sql-catalog/src/Core/Catalog/CatalogEntry.php:50
- static-call SqlCatalog\Reporter\Html\CatalogStatistics::byResolution() packages/sql-catalog/src/Reporter/Html/CatalogStatistics.php:102
- static-call SqlCatalog\Reporter\Html\Page\OverviewPage::coverage() packages/sql-catalog/src/Reporter/Html/Page/OverviewPage.php:236
- static-call SqlCatalog\Reporter\Html\StatementList::facets() packages/sql-catalog/src/Reporter/Html/StatementList.php:83
Constant reads 15
- class-const SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:220
- class-const SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:239
- class-const SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:245
- class-const SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:248
- class-const SqlCatalog\Core\Analysis\EntryFactory::findings() packages/sql-catalog/src/Core/Analysis/EntryFactory.php:248
- class-const SqlCatalog\Reporter\Html\Page\StatementPage::title() packages/sql-catalog/src/Reporter/Html/Page/StatementPage.php:96
- class-const SqlCatalog\Reporter\Html\Page\StatementPage::body() packages/sql-catalog/src/Reporter/Html/Page/StatementPage.php:136
- class-const SqlCatalog\Reporter\Html\Page\StatementPage::caveats() packages/sql-catalog/src/Reporter/Html/Page/StatementPage.php:156
- class-const SqlCatalog\Reporter\Html\Palette::resolution() packages/sql-catalog/src/Reporter/Html/Palette.php:69
- class-const SqlCatalog\Reporter\Html\Palette::resolution() packages/sql-catalog/src/Reporter/Html/Palette.php:70
- class-const SqlCatalog\Reporter\Html\Palette::resolution() packages/sql-catalog/src/Reporter/Html/Palette.php:71
- class-const SqlCatalog\Reporter\Html\Palette::resolution() packages/sql-catalog/src/Reporter/Html/Palette.php:71
- class-const SqlCatalog\Reporter\Html\Palette::resolution() packages/sql-catalog/src/Reporter/Html/Palette.php:72
- class-const SqlCatalog\Reporter\Html\StatementRow::sql() packages/sql-catalog/src/Reporter/Html/StatementRow.php:98
- class-const SqlCatalog\Reporter\Html\StatementRow::meta() packages/sql-catalog/src/Reporter/Html/StatementRow.php:128