Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 8be9acf

Browse files
Consistently throw exceptions on a single line
1 parent 1fb8633 commit 8be9acf

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

Guard/Firewall/GuardAuthenticationListener.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,7 @@ private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticat
190190
}
191191

192192
if (!$response instanceof Response) {
193-
throw new \LogicException(sprintf(
194-
'%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.',
195-
\get_class($guardAuthenticator)
196-
));
193+
throw new \LogicException(sprintf('%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', \get_class($guardAuthenticator)));
197194
}
198195

199196
$this->rememberMeServices->loginSuccess($request, $response, $token);

Guard/GuardAuthenticatorHandler.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ
8484
return $response;
8585
}
8686

87-
throw new \UnexpectedValueException(sprintf(
88-
'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.',
89-
\get_class($guardAuthenticator),
90-
\is_object($response) ? \get_class($response) : \gettype($response)
91-
));
87+
throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response)));
9288
}
9389

9490
/**
@@ -132,11 +128,7 @@ public function handleAuthenticationFailure(AuthenticationException $authenticat
132128
return $response;
133129
}
134130

135-
throw new \UnexpectedValueException(sprintf(
136-
'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.',
137-
\get_class($guardAuthenticator),
138-
\is_object($response) ? \get_class($response) : \gettype($response)
139-
));
131+
throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response)));
140132
}
141133

142134
/**

0 commit comments

Comments
 (0)