Fix return type of randomDigits

This commit is contained in:
Art4 2025-02-06 08:30:05 +00:00
parent c6ee2c461c
commit c7b1961d02

View file

@ -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;
}
}