* 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 = '';
$rn .= random_int(0, 9);
}
- return (int) $rn;
+ return $rn;
}
}