classArtifactWriter
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
$directory | string | |
$artifacts | CatalogArtifacts |
Returns
list<string>Throws
WriteFailureException When the directory or one of the files cannot be writtenTest cases 2
Called from 1
Calls 6
- method-call ArtifactWriter::prepare() line 28
- method-call CatalogArtifacts::all() line 31
- function-call
rtrimline 32 - function-call
dirnameline 33 - function-call
file_put_contentsline 34 - new WriteFailureException line 35
public function prepare(string $directory): voidMakes 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
$directory | string |
Throws
WriteFailureException When the directory is missing and cannot be createdTest cases 1
Called from 2
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
CatalogCommandTestcalls