chore: refactors exceptions

This commit is contained in:
nuno maduro
2026-08-07 15:26:55 +01:00
parent 42d9b777bf
commit 8c554a81e2
54 changed files with 145 additions and 94 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ final class Container
if ($type instanceof \ReflectionType && $type->isBuiltin()) {
$candidate = $param->getName();
} else {
throw ShouldNotHappen::fromMessage(sprintf('The type of `$%s` in `%s` cannot be determined.', $id, $param->getName()));
throw ShouldNotHappen::fromMessage(sprintf('The type of [$%s] in [%s] cannot be determined.', $id, $param->getName()));
}
}
@@ -88,6 +88,6 @@ final class Container
return $reflectionClass->newInstance();
}
throw ShouldNotHappen::fromMessage(sprintf('A dependency with the name `%s` cannot be resolved.', $id));
throw ShouldNotHappen::fromMessage(sprintf('A dependency with the name [%s] cannot be resolved.', $id));
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ final class Coverage
return 0.0;
}
throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: %s.', $reportPath));
throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: [%s].', $reportPath));
}
CoverageMerger::applyIfMarked($reportPath);