classCoverageSnapshotStore
final class CoverageSnapshotStore
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Owns atomic snapshot replacement and rejects a second writer for the same key.
Properties§
public string $pathSnapshot filename for this compatibility key.
Methods§
public function __construct(string $directory, string $key)Locks a compatibility key before reading or generating anything.
Parameters
$directory | string | |
$key | string |
Throws
CoverageException When storage or the exclusive lock is unavailableTest cases 3
public function __destruct()Releases the writer without implicitly flushing or masking an original failure.
Test cases 3
public function read(): ?stringReads only this key's snapshot, never a fuzzer corpus.
Returns
?stringThrows
CoverageException When an existing snapshot cannot be readTest cases 2
Calls 3
- function-call
file_existsline 66 - function-call
file_get_contentsline 69 - new CoverageException line 71
public function write(string $json): voidReplaces a complete file within the same filesystem; a failed write keeps history intact.
Parameters
$json | string |
Throws
CoverageException When the checkpoint cannot be persistedTest cases 1
Private surface 1§
Implementation details, listed for orientation only.
private resource|null $lock = nullTest cases 8§
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 5
ByteChoicesTestcallsGrammarCoverageInventoryTestcallsGrammarCoverageTestcallsSnapshotValidationTestcallsDerivationNodeTestcalls