classStatementRow
final class StatementRow
One statement as a row of a listing.
A row is a doc-ui listing row. A listing is for scanning, so a row shows the statement itself first — the SQL in doc-ui's multiline code block — and then where it is issued, with every place it names linked to the page for it. What the analyzer thinks of the statement is shown only when it is not the ordinary case: a resolved statement with nothing reported carries no state chips at all, so the ones that do stand out.
Methods§
public function __construct(
?HtmlText $text = null,
?SqlHighlighter $sql = null,
?Palette $palette = null,
?SqlFormatter $formatter = null,
)Wires the row to the text and SQL rendering it is written with.
Parameters
$text | ?HtmlText | |
$sql | ?SqlHighlighter | |
$palette | ?Palette | |
$formatter | ?SqlFormatter |
Calls 4
- new HtmlText line 39
- new SqlHighlighter line 40
- new Palette line 41
- new SqlFormatter line 42
public function render(
ReportSite $site,
string $page,
CatalogEntry $entry,
list<string> $omit = [],
): stringThe row, with its links written relative to the page it is on.
Parameters
$site | ReportSite | |
$page | string | |
$entry | CatalogEntry | |
$omit | list<string> | The facts the listing already states, out of `function`, `file` and `tables` |
Returns
stringCalled from 1
Calls 9
- method-call ReportSite::prefixOf() line 52
- method-call StatementRow::attributes() line 54
- method-call HtmlText::escape() line 55
- method-call ReportSite::statementPage() line 55
- method-call HtmlText::chip() line 56
- function-call
strtoupperline 56 - method-call Palette::kind() line 56
- method-call StatementRow::sql() line 57
- method-call StatementRow::meta() line 58
public function attributes(CatalogEntry $entry): stringThe facts a listing can be narrowed by, written as attributes.
Parameters
$entry | CatalogEntry |
Returns
stringTest cases 2
Called from 1
Calls 7
- static-call Scope::of() line 67
- method-call CatalogEntry::resolution() line 74
- method-call CatalogEntry::severity() line 75
- function-call
implodeline 76 - function-call
array_uniqueline 76 - method-call CatalogEntry::searchClosed() line 78
- method-call HtmlText::escape() line 87
public function sql(CatalogEntry $entry, ?SqlFormatter $formatter = null): stringThe formatted statement, or the call it was not read from.
Parameters
$entry | CatalogEntry | |
$formatter | ?SqlFormatter |
Returns
stringTest cases 2
Called from 1
Calls 6
- method-call CatalogEntry::resolution() line 98
- class-const Resolution::NotAnalyzed() line 98
- method-call SqlHighlighter::render() line 99
- method-call CatalogEntry::parts() line 99
- method-call CatalogEntry::firstGap() line 101
- method-call HtmlText::escape() line 104
public function meta(
ReportSite $site,
string $prefix,
CatalogEntry $entry,
list<string> $omit,
): stringWhere the statement is issued and what is known about the reading.
Parameters
$site | ReportSite | |
$prefix | string | |
$entry | CatalogEntry | |
$omit | list<string> |
Returns
stringTest cases 2
Called from 1
Calls 15
- static-call Scope::of() line 114
- function-call
in_arrayline 116 - method-call HtmlText::link() line 117
- method-call ReportSite::filePage() line 117
- method-call ReportSite::functionUrl() line 120
- method-call HtmlText::chipLink() line 124
- method-call ReportSite::tablePage() line 124
- method-call CatalogEntry::resolution() line 127
- class-const Resolution::Resolved() line 128
- method-call HtmlText::chip() line 129
- method-call Palette::resolution() line 129
- method-call CatalogEntry::severity() line 131
- class-const Severity::Medium() line 131
- method-call Palette::severity() line 132
- function-call
implodeline 135
Private surface 4§
Implementation details, listed for orientation only.
private HtmlText $textprivate SqlHighlighter $sqlprivate Palette $paletteprivate SqlFormatter $formatterTest cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
StatementRowTest::testAttributesCarryEveryFactAListingIsNarrowedBycallsStatementRowTest::testAttributesNameARuleOnceHoweverOftenItWasReportedcallsStatementRowTest::testMetaNamesTheFunctionUnlessTheListingAlreadyDoescallsStatementRowTest::testMetaOmitsWhatTheListingAlreadyStatesAndShowsWhatIsNotOrdinarycallsStatementRowTest::testRenderLinksTheStatementAndWhereItIsIssuedRelativeToThePagecallsStatementRowTest::testSqlDisplaysThePhpVariableForAnUnknownStatementcallsStatementRowTest::testSqlDoesNotDressUpACallNoStatementWasReadFromcalls
Other tests reaching this symbol 14
ReporterInterfaceTestcallsHtmlReporterTestcallsClassPageTestcallsFileIndexPageTestcallsFilePageTestcallsFindingPageTestcallsNamespacePageTestcallsOverviewPageTestcallsStatementIndexPageTestcallsStatementPageTestcallsTableIndexPageTestcallsTablePageTestcallsPageShellTestcallsStatementListTestcalls