final class SourceUnit

A unit in scope together with the specifications that claim it.

Properties§

public array<string, Item> $claims = []
public Source $source
public Unit $unit

Methods§

public function __construct(public Source $source, public Unit $unit)

Parameters

$sourceSourceThe source whose scope selected the unit
$unitUnitThe unit
public function supported(): bool
public function toArray(array<string, Item> $items): array<string, mixed>

Returns the unit as a coverage report record.

Parameters

$itemsarray<string, Item>Every item by ID

Returns

array<string, mixed> The location, text, claims, status and fingerprint

Throws

JsonException When a record cannot be encoded
Test cases 4
Calls 3

Test cases 33§

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

Dedicated tests 10
Other tests reaching this symbol 23

Relations§

Instantiated in 1