classAnalysis
final class Analysis
The result of analyzing a project's sources: units, scopes, errors and resolved evidence.
Properties§
public array<string, SourceUnit> $unitspublic array<string, list<string>> $scopespublic list<string> $errorspublic array<string, list<string>> $evidenceMethods§
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
$units | array<string, SourceUnit> | Every unit in scope by key, with its claims |
$scopes | array<string, list<string>> | The unit keys of each scope by source ID |
$errors | list<string> | Scope and evidence failures |
$evidence | array<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
$keys | list<string>|null | The 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 unitsTest cases 2
Called from 3
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
MarkdownDocumentTestcallsApplicationTestcallsCommandHandlerTestcallsExecutorTestcallsAnalyzerTestcallsCoverageTest::testReportAppliesTheDifferentialThresholdToNewAndChangedUnitscallsCoverageTest::testReportAppliesTheOverallThresholdcallsCoverageTest::testReportAppliesTheSourceThresholdscallsCoverageTest::testReportDescribesEveryUnitAndPassesWithoutGatescallsCoverageTest::testReportFailsAPositiveOverallThresholdWithoutUnitscallsCoverageTest::testReportFailsWithTheErrorsOfTheAnalysiscallsCoverageTest::testReportRejectsAFileThatIsNotASnapshotcallsCoverageTest::testReportRejectsRemovedUnitsUnlessAllowedcallsCoverageTest::testReportRequiresASnapshotForAPositiveDifferentialThresholdcallsCoverageTest::testReportSkipsTheDifferentialThresholdWithoutChangedUnitscallsSnapshotTest::testCompareListsNewAndChangedUnitsAndRemovedKeyscallsSnapshotTest::testCreateListsTheFingerprintOfEveryUnitcallsVerifierTestcalls
Relations§
Instantiated in 1
Method calls 3
Type declarations 4
- type Requirements\Report\Analyzer packages/requirements/src/Report/Analyzer.php:29
- type Requirements\Report\Coverage packages/requirements/src/Report/Coverage.php:31
- type Requirements\Report\Snapshot packages/requirements/src/Report/Snapshot.php:35
- type Requirements\Report\Snapshot packages/requirements/src/Report/Snapshot.php:87