final class Analysis

The result of analyzing a project's sources: units, scopes, errors and resolved evidence.

Properties§

public array<string, SourceUnit> $units
public array<string, list<string>> $scopes
public list<string> $errors
public array<string, list<string>> $evidence

Methods§

public function __construct(
    public array<string, SourceUnit> $units,
    public array<string, list<string>> $scopes,
    public list<string> $errors,
    public array<string, list<string>> $evidence,
)

Parameters

$unitsarray<string, SourceUnit>Every unit in scope by key, with its claims
$scopesarray<string, list<string>>The unit keys of each scope by source ID
$errorslist<string>Scope and evidence failures
$evidencearray<string, list<string>>The quoted unit keys by item ID
public function summary(list<string>|null $keys = null): array{total: int, accounted: int, supported: int, unsupported: int, uncovered: int, percentage: float|null}

Counts how the units are accounted for.

Parameters

$keyslist<string>|nullThe unit keys to count; every unit when null

Returns

array{total: int, accounted: int, supported: int, unsupported: int, uncovered: int, percentage: float|null} The counts and the accounted percentage, null without units
Test cases 2
Called from 3
Calls 2

Test cases 20§

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

Dedicated tests 2
Other tests reaching this symbol 18

Relations§

Instantiated in 1
Method calls 3
Type declarations 4