mirror of
https://github.com/friendica/friendica
synced 2025-05-13 18:24:14 +02:00
Fix return type of randomDigits
This commit is contained in:
parent
c6ee2c461c
commit
c7b1961d02
1 changed files with 3 additions and 3 deletions
|
@ -299,11 +299,11 @@ class Crypto
|
||||||
* Creates cryptographic secure random digits
|
* Creates cryptographic secure random digits
|
||||||
*
|
*
|
||||||
* @param string $digits The count of 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
|
* @throws \Exception In case 'random_int' isn't usable
|
||||||
*/
|
*/
|
||||||
public static function randomDigits($digits)
|
public static function randomDigits($digits): string
|
||||||
{
|
{
|
||||||
$rn = '';
|
$rn = '';
|
||||||
|
|
||||||
|
@ -312,6 +312,6 @@ class Crypto
|
||||||
$rn .= random_int(0, 9);
|
$rn .= random_int(0, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) $rn;
|
return $rn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue