From c7b1961d02deb873439c694ea1cba8f7406c666c Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 6 Feb 2025 08:30:05 +0000 Subject: [PATCH] Fix return type of randomDigits --- src/Util/Crypto.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Util/Crypto.php b/src/Util/Crypto.php index 588be8f932..084ae567ea 100644 --- a/src/Util/Crypto.php +++ b/src/Util/Crypto.php @@ -299,11 +299,11 @@ class Crypto * Creates cryptographic secure random digits * * @param string $digits The count of digits - * @return int The random Digits + * @return string The random Digits * * @throws \Exception In case 'random_int' isn't usable */ - public static function randomDigits($digits) + public static function randomDigits($digits): string { $rn = ''; @@ -312,6 +312,6 @@ class Crypto $rn .= random_int(0, 9); } - return (int) $rn; + return $rn; } }