diff --git a/GuardHelpers.php b/GuardHelpers.php index 21094bf8..9cdf6977 100644 --- a/GuardHelpers.php +++ b/GuardHelpers.php @@ -33,11 +33,7 @@ trait GuardHelpers */ public function authenticate() { - if (! is_null($user = $this->user())) { - return $user; - } - - throw new AuthenticationException; + return $this->user() ?? throw new AuthenticationException; } /**