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

Writes what a reporter produced into a directory.

Methods§

public function write(string $directory, CatalogArtifacts $artifacts): list<string>

The files written, in the order they were written.

A reporter may name its artifacts with a path rather than a bare name — a site of pages does — so the directory each file is written into is made before the file is.

Parameters

$directorystring
$artifactsCatalogArtifacts

Returns

list<string>

Throws

WriteFailureException When the directory or one of the files cannot be written
Test cases 2
Called from 1
Calls 6
public function prepare(string $directory): void

Makes sure the directory exists and can be written into.

Every reason it cannot be is checked before anything is attempted, so a failure arrives as one explained exception rather than as a warning from whichever call happened to run into it first.

Parameters

$directorystring

Throws

WriteFailureException When the directory is missing and cannot be created
Test cases 1
Called from 2
Calls 5

Test cases 4§

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

Dedicated tests 3
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Method calls 1
Type declarations 1