Skip to content

Commit

Permalink
Fix method return typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Sep 22, 2018
1 parent 4cc8445 commit c6cfd66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/User/LoginProvider.php
Expand Up @@ -45,14 +45,16 @@ public function user()
*
* @param string $provider
* @param string $identifier
* @return User
* @return User|null
*/
public static function logIn(string $provider, string $identifier): User
public static function logIn(string $provider, string $identifier): ?User
{
if ($provider = static::where(compact('provider', 'identifier'))->first()) {
$provider->touch();

return $provider->user;
}

return null;
}
}

0 comments on commit c6cfd66

Please sign in to comment.