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

Writes the catalog as a site of linked HTML pages.

A reader comes to a catalog to find a statement and decide something about it, so the site is laid out as the routes to one: by the table it names, by the namespace and class that issue it, by the file it is written in, by what the analysis reported on it, or through the whole listing narrowed down. Every statement has a page of its own, which is where every route ends.

Constants§

public const FILE = ReportSite::INDEX

The name the page a reader opens first is written under.

Methods§

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

Supplies SQL presentation independently of page rendering.

Parameters

$formatterSqlFormatter
Calls 1
public function name(): string

The name the command line selects this reporter by.

Returns

string
Test cases 1
public function description(): string

What the reporter produces.

Returns

string
Test cases 1
public function render(Catalog $catalog): CatalogArtifacts

The catalog rendered as a site of pages.

Parameters

$catalogCatalog
Test cases 7
Calls 36
public function tablePages(ReportSite $site, PageShell $shell): array<string, string>
public function classPages(ReportSite $site, PageShell $shell): array<string, string>
public function filePages(ReportSite $site, PageShell $shell): array<string, string>
public function statementPages(ReportSite $site, PageShell $shell): array<string, string>

Private surface 1§

Implementation details, listed for orientation only.

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

Test cases 19§

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

Dedicated tests 13
Other tests reaching this symbol 6

Relations§

Instantiated in 1