This commit is contained in:
nuno maduro
2026-05-02 17:59:00 +01:00
parent d00ec95dd9
commit 1e48c5d473

View File

@ -19,7 +19,7 @@ final class CoverageMerger
{
$state = self::state();
if (! $state instanceof State || ! $state->exists(Tia::KEY_COVERAGE_MARKER)) {
if (! $state->exists(Tia::KEY_COVERAGE_MARKER)) {
return;
}
@ -131,15 +131,12 @@ final class CoverageMerger
return array_keys($ids);
}
private static function state(): ?State
private static function state(): State
{
try {
$state = Container::getInstance()->get(State::class);
} catch (Throwable) {
return null;
}
assert($state instanceof State);
return $state instanceof State ? $state : null;
return $state;
}
private static function requireCoverage(string $reportPath): ?CodeCoverage