classFilePage
final class FilePage
One file: the statements each function in it issues.
A file is read top to bottom, so its statements are listed under the functions that issue them in the order the functions are written, with top-level code first. A method's section says which class it belongs to and leads to that class's page.
Methods§
public function __construct(?HtmlText $text = null, ?StatementList $list = null)Wires the page to the rendering it is written with.
Parameters
$text | ?HtmlText | |
$list | ?StatementList |
Calls 2
- new HtmlText line 36
- new StatementList line 37
public function render(ReportSite $site, string $file): stringThe body of one file's page.
Parameters
$site | ReportSite | |
$file | string |
Returns
stringTest cases 3
Called from 1
Calls 12
- method-call ReportSite::index() line 45
- method-call FilePage::functions() line 46
- method-call HtmlText::escape() line 48
- method-call HtmlText::count() line 48
- function-call
countline 48 - method-call HtmlText::plural() line 49
- method-call FilePage::problems() line 51
- method-call FilePage::tables() line 52
- method-call StatementList::facets() line 54
- method-call FilePage::sections() line 54
- method-call SourceCode::file() line 55
- new SourceCode line 55
public function problems(ReportSite $site, string $file): stringWhy the file could not be analyzed, beside the source that caused it.
Parameters
$site | ReportSite | |
$file | string |
Returns
stringTest cases 1
Called from 1
Calls 2
- method-call ReportSite::catalog() line 64
- method-call HtmlText::escape() line 66
public function tables(ReportSite $site, list<CatalogEntry> $entries): stringThe tables a set of statements names, most named first.
Parameters
$site | ReportSite | |
$entries | list<CatalogEntry> |
Returns
stringTest cases 1
Called from 1
Calls 5
- method-call ReportSite::index() line 81
- method-call HtmlText::chipCount() line 82
- method-call TableName::label() line 82
- new TableName line 82
- method-call ReportSite::tablePage() line 82
public function functions(list<CatalogEntry> $entries): array<string, list<CatalogEntry>>The statements of each function among a set, in the order the functions are written.
Parameters
$entries | list<CatalogEntry> |
Returns
array<string, list<CatalogEntry>>Test cases 1
Called from 2
Calls 1
- function-call
uasortline 101
public function sections(
ReportSite $site,
string $file,
array<string, list<CatalogEntry>> $functions,
): stringOne section per function, each listing what it issues.
Parameters
$site | ReportSite | |
$file | string | |
$functions | array<string, list<CatalogEntry>> |
Returns
stringTest cases 1
Called from 1
Calls 9
- static-call Scope::of() line 115
- method-call ReportSite::functionAnchor() line 116
- method-call HtmlText::escape() line 118
- method-call HtmlText::link() line 119
- method-call ReportSite::classPage() line 119
- method-call HtmlText::count() line 120
- function-call
countline 120 - method-call StatementList::rows() line 123
- method-call ReportSite::filePage() line 123
public function context(
ReportSite $site,
string $file,
): list<array{string, list<array{string, string, int|null, bool}>, string|null}>What the page is best left from: its functions, and the other files of the directory.
Parameters
$site | ReportSite | |
$file | string |
Returns
list<array{string, list<array{string, string, int|null, bool}>, string|null}>Test cases 3
Called from 1
Calls 8
- method-call ReportSite::index() line 136
- method-call FilePage::anchors() line 138
- method-call ReportSite::catalog() line 141
- function-call
strrposline 144 - function-call
substrline 145 - method-call ReportSite::filePage() line 149
- function-call
countline 149 - class-const ReportSite::FILES() line 152
public function anchors(
ReportSite $site,
list<CatalogEntry> $entries,
): list<array{string, string}>The sections of the page, for the navigation.
Parameters
$site | ReportSite | |
$entries | list<CatalogEntry> |
Returns
list<array{string, string}>Test cases 1
Called from 1
Calls 4
- function-call
array_keysline 164 - method-call FilePage::functions() line 164
- static-call Scope::of() line 165
- method-call ReportSite::functionAnchor() line 165
Private surface 2§
Implementation details, listed for orientation only.
private HtmlText $textprivate StatementList $listTest cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 11
FilePageTest::testAnchorsNameTheTablesAndEveryFunctioncallsFilePageTest::testContextLinksToTheSourceEvenWhenParsingFailedcallsFilePageTest::testContextListsTheFunctionsAndTheFilesOfTheSameDirectorycallsFilePageTest::testContextNamesTheRootDirectorycallsFilePageTest::testFunctionsAreInTheOrderTheyAreWrittencallsFilePageTest::testProblemsExplainsWhyThisFileCouldNotBeParsedcallsFilePageTest::testRenderIsWrittenExactlycallsFilePageTest::testRenderListsTheStatementsFunctionByFunctioncallsFilePageTest::testRenderShowsTheParseErrorBeforeTheFileContentscallsFilePageTest::testSectionsLeadFromAMethodToItsClasscallsFilePageTest::testTablesLinkToTheTablesNamedcalls
Other tests reaching this symbol 2
ReporterInterfaceTestcallsHtmlReporterTestcalls