From 673509a2c7b81510592666813e6a1433ee11e576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=CC=88nther=20Debrauwer?= Date: Mon, 13 May 2024 09:14:44 +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 a4cd84a..cb91f6e 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 = (int) ($number % strlen($characters)); + $digit = intval($number % strlen($characters)); $string = $characters[$digit] . $string;