diff --git a/src/Psl/Type/Internal/PositiveIntType.php b/src/Psl/Type/Internal/PositiveIntType.php index 10c46ae4..4ad723bb 100644 --- a/src/Psl/Type/Internal/PositiveIntType.php +++ b/src/Psl/Type/Internal/PositiveIntType.php @@ -58,10 +58,7 @@ public function coerce(mixed $value): int return $int; } - // Exceptional case "000" -(trim)-> "", but we treat it as 0 - if ('' === $trimmed && '' !== $str) { - CoercionException::withValue($value, $this->toString()); - } + throw CoercionException::withValue($value, $this->toString()); } if (is_float($value)) {