mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Code cleanup.
This commit is contained in:
@@ -76,14 +76,14 @@ class User extends Authenticatable
|
||||
* @param string $value
|
||||
*
|
||||
* @return User
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): User
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$userId = intval($value);
|
||||
$userId = (int)$value;
|
||||
$user = self::find($userId);
|
||||
if (!is_null($user)) {
|
||||
if (null !== $user) {
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class User extends Authenticatable
|
||||
{
|
||||
$bytes = random_bytes(16);
|
||||
|
||||
return strval(bin2hex($bytes));
|
||||
return (string)bin2hex($bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user