classTextReporter
final class TextReporter
implements ReporterInterface
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Writes the catalog as plain lines, for reading in a terminal.
Constants§
public const FILE = 'catalog.txt'The name the artifact is written under.
Methods§
public function name(): stringThe name the command line selects this reporter by.
Returns
stringTest cases 1
public function description(): stringWhat the reporter produces.
Returns
stringTest cases 1
public function render(Catalog $catalog): CatalogArtifactsThe catalog rendered as plain text.
Parameters
$catalog | Catalog |
Returns
Test cases 3
Calls 7
- method-call Catalog::sorted() line 50
- method-call TextReporter::entryLines() line 51
- function-call
sprintfline 57 - method-call TextReporter::summaryLine() line 60
- static-call CatalogArtifacts::one() line 62
- class-const TextReporter::FILE() line 62
- function-call
implodeline 62
public function entryLines(CatalogEntry $entry): list<string>The lines one statement is written as.
Parameters
$entry | CatalogEntry |
Returns
list<string>Test cases 3
Called from 1
Calls 4
- function-call
sprintfline 73 - function-call
strtoupperline 73 - method-call CatalogEntry::sql() line 75
- method-call TextReporter::statusLine() line 76
public function statusLine(CatalogEntry $entry): stringThe line saying how far the analyzer got with a statement.
Parameters
$entry | CatalogEntry |
Returns
stringTest cases 2
Called from 1
Calls 4
- method-call CatalogEntry::resolution() line 93
- method-call CatalogEntry::searchClosed() line 94
- function-call
countline 100 - function-call
implodeline 101
public function summaryLine(Catalog $catalog): stringThe closing line naming what the run found.
Parameters
$catalog | Catalog |
Returns
stringTest cases 1
Called from 1
Calls 4
- function-call
countline 116 - function-call
sprintfline 119 - method-call Catalog::count() line 121
- method-call Catalog::problems() line 124
Test cases 17§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 11
TextReporterTest::testDescriptionMentionsWhatItProducescallsTextReporterTest::testEntryLinesAreWrittenExactlycallsTextReporterTest::testEntryLinesShowTheFindingscallsTextReporterTest::testEntryLinesShowTheStatementAndItsParameterscallsTextReporterTest::testNameIsHowTheCommandLineSelectsItcallsTextReporterTest::testRenderReportsTheFilesThatCouldNotBeReadcallsTextReporterTest::testRenderWritesOneTextFilecallsTextReporterTest::testRenderWritesTheWholeReportExactlycallsTextReporterTest::testStatusLineSaysHowFarTheAnalyzerGotcallsTextReporterTest::testStatusLineWarnsWhenTheSearchDidNotClosecallsTextReporterTest::testSummaryLineCountsWhatWasFoundcalls