mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 22:33:35 +02:00
chore: refactors exceptions
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user