classClassPage
final class ClassPage
One class: the statements each of its methods issues.
This is the page opened before a class is refactored. The statements are listed under the method that issues them, in the order the methods are written, so a reader can see the shape of what each method does to the database before changing how it does it.
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 35
- new StatementList line 36
public function render(ReportSite $site, string $class): stringThe body of one class's page.
Parameters
$site | ReportSite | |
$class | string |
Returns
stringTest cases 2
Called from 1
Calls 14
- method-call ReportSite::index() line 44
- method-call ClassPage::methods() line 46
- static-call Scope::of() line 47
- method-call HtmlText::link() line 50
- method-call ReportSite::filePage() line 50
- method-call HtmlText::escape() line 53
- method-call HtmlText::count() line 53
- function-call
countline 53 - method-call HtmlText::plural() line 54
- function-call
implodeline 56 - method-call ClassPage::tables() line 57
- method-call StatementList::facets() line 59
- method-call ClassPage::sections() line 59
- method-call ReportSite::classPage() line 59
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 70
- method-call HtmlText::chipCount() line 71
- method-call TableName::label() line 71
- new TableName line 71
- method-call ReportSite::tablePage() line 71
public function methods(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 90
public function sections(
ReportSite $site,
string $page,
array<string, list<CatalogEntry>> $functions,
): stringOne section per function, each listing what it issues.
Parameters
$site | ReportSite | |
$page | string | |
$functions | array<string, list<CatalogEntry>> |
Returns
stringTest cases 1
Called from 1
Calls 6
- method-call ReportSite::functionAnchor() line 105
- method-call HtmlText::escape() line 106
- static-call Scope::of() line 107
- method-call HtmlText::count() line 107
- function-call
countline 107 - method-call StatementList::rows() line 110
public function context(
ReportSite $site,
string $class,
): list<array{string, list<array{string, string, int|null, bool}>, string|null}>What the page is best left from: its methods, and the other classes of the namespace.
Parameters
$site | ReportSite | |
$class | string |
Returns
list<array{string, list<array{string, string, int|null, bool}>, string|null}>Test cases 1
Called from 1
Calls 6
- method-call ReportSite::index() line 123
- static-call Scope::of() line 124
- method-call ClassPage::anchors() line 126
- method-call ReportSite::classPage() line 133
- function-call
countline 133 - class-const ReportSite::NAMESPACES() line 137
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 149 - method-call ClassPage::methods() line 149
- static-call Scope::of() line 150
- method-call ReportSite::functionAnchor() line 150
Private surface 2§
Implementation details, listed for orientation only.
private HtmlText $textprivate StatementList $listTest cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
ClassPageTest::testAnchorsNameTheTablesAndEveryMethodcallsClassPageTest::testContextListsTheMethodsAndTheClassesOfTheSameNamespacecallsClassPageTest::testMethodsAreInTheOrderTheyAreWrittencallsClassPageTest::testRenderIsWrittenExactlycallsClassPageTest::testRenderListsTheStatementsMethodByMethodcallsClassPageTest::testSectionsHeadEachMethodWithWhereItStartscallsClassPageTest::testTablesSaySoWhenNoneIsNamedcalls
Other tests reaching this symbol 2
ReporterInterfaceTestcallsHtmlReporterTestcalls