final class ReportSite
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

The pages the report is made of, and the address of everything on them.

A reader reaches a statement by a route — the table it names, the class or file it is written in, the finding reported on it — and each route is a page of its own. Once every table, class, file and statement has an address, any page can point at any other rather than repeating it, which is what lets a statement be found from wherever the reader started.

Constants§

public const INDEX = 'index.html'

The page a reader opens first.

public const STATEMENTS = 'statements.html'

The page listing every statement, for narrowing down.

public const TABLES = 'tables.html'

The page listing every table the catalog names.

public const NAMESPACES = 'namespaces.html'

The page listing every namespace, with its classes and functions.

public const FILES = 'files.html'

The page listing every file the statements are written in.

public const FINDINGS = 'findings.html'

The page listing every finding.

Properties§

public SqlFormatter $formatter = new \SqlCatalog\Reporter\Html\SqlFormatter()

Methods§

public function __construct(
    Catalog $catalog,
    ?HtmlText $text = null,
    public SqlFormatter $formatter = new \SqlCatalog\Reporter\Html\SqlFormatter(),
)

Lays a catalog out as pages.

Parameters

$catalogCatalog
$text?HtmlText
$formatterSqlFormatter
Calls 10
public function index(): CatalogIndex

The catalog grouped along every route.

Test cases 1
Called from 39
public function pagesFor(list<string> $keys, string $directory): array<string, string>
public function tablePage(string $table): string

The page one table is written on, or the tables listing for a table the catalog does not name.

Parameters

$tablestring

Returns

string
Test cases 1
Called from 13
Calls 1
public function filePage(string $file): string

The page one file is written on, or the files listing for a file the catalog does not hold.

Parameters

$filestring

Returns

string
Test cases 1
Called from 15
Calls 1
public function functionUrl(CatalogEntry $entry): string

The address of the section listing what one function issues.

A method is listed on its class's page; a function, and top-level code, on the page of the file it is written in.

Parameters

Returns

string
Test cases 1
Called from 8
Calls 4
public function classes(): list<string>

Every class that has a page, in name order.

Returns

list<string>
Test cases 1
Called from 1
Calls 1

Private surface 7§

Implementation details, listed for orientation only.

private Catalog $catalog
private CatalogIndex $index
private CatalogStatistics $statistics
private HtmlText $text
private array<string, string> $tablePages
private array<string, string> $classPages
private array<string, string> $filePages

Test cases 101§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 14
Other tests reaching this symbol 87

Relations§

Instantiated in 1
Method calls 119
Constant reads 45
Type declarations 59