From ebd6914f7bf1c843a9cf5ab888e454503400db22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=CC=88nther=20Debrauwer?= Date: Mon, 13 May 2024 09:54:24 +0200 Subject: [PATCH] Fix implicit conversion deprecation warning when converting float to int --- src/UniqueCodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;