Skip to content

Commit cea8110

Browse files
fix rule
1 parent 41bdc50 commit cea8110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Geography/Address/ByCountry/Us/ZipCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function setValue(string $value): void
2323
$characters++;
2424
}
2525

26-
if (empty($value) || $characters != 5 && $characters != 9 && ctype_digit($value)) {
26+
if (empty($value) || ctype_digit($value) !== true || ($characters != 5 && $characters != 9)) {
2727
throw new \InvalidArgumentException(sprintf('The value "%s" is not a valid postal code.', $value));
2828
}
2929

0 commit comments

Comments
 (0)