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

The files a reporter produced, held in memory until something writes them.

Keeping the rendering separate from the writing is what lets the same reporter print to standard output and write into a directory.

Methods§

public function __construct(array<string, string> $files = [], string|null $primary = null)

Parameters

$filesarray<string, string>Contents, keyed by the name to write them under
$primarystring|nullThe file a reader wants when only one can be shown
public function all(): array<string, string>
public function names(): list<string>

The file names, in order.

Returns

list<string>
Test cases 2
Calls 2
public function sole(): ?string

The contents of the only file, or null when there is not exactly one.

Returns

?string
Test cases 1
Called from 1
Calls 2
public function primary(): ?string

The contents a reader wants when only one file can be shown.

Writing into a directory can produce more than one file — a document and the schema that describes it. Printing cannot, so one of them is the one that gets printed.

Returns

?string
Test cases 3
Calls 1
public function get(string $name): ?string

The contents written under a name, or null when nothing is.

Parameters

$namestring

Returns

?string

Private surface 2§

Implementation details, listed for orientation only.

private array<string, string> $files
private ?string $primary

Test cases 15§

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

Dedicated tests 8
Other tests reaching this symbol 7

Relations§

Instantiated in 2
Static calls 1
Method calls 1
Type declarations 5