diff --git a/src/UniqueCodes.php b/src/UniqueCodes.php index cb91f6e..8de2d85 100644 --- a/src/UniqueCodes.php +++ b/src/UniqueCodes.php @@ -224,7 +224,7 @@ protected function encodeNumber(int $number) $characters = $this->characters; for ($i = 0; $i < $this->length; $i++) { - $digit = intval($number % strlen($characters)); + $digit = intval($number) % strlen($characters); $string = $characters[$digit] . $string;