Code cleanup.

This commit is contained in:
James Cole
2018-04-02 14:17:11 +02:00
parent 4cea5d65a6
commit f96f38b172
44 changed files with 87 additions and 100 deletions

View File

@@ -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);
}
/**