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

Commit 149b0eb

Browse files
committed
Adding periods at the end of exceptions, and changing one class name to LogicException thanks to @iltar
1 parent 4c99ad9 commit 149b0eb

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Guard/Firewall/GuardAuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticat
162162

163163
if (null === $this->rememberMeServices) {
164164
if (null !== $this->logger) {
165-
$this->logger->info('Remember me skipped: it is not configured for the firewall', array('authenticator' => get_class($guardAuthenticator)));
165+
$this->logger->info('Remember me skipped: it is not configured for the firewall.', array('authenticator' => get_class($guardAuthenticator)));
166166
}
167167

168168
return;

Guard/GuardAuthenticatorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ
6868
}
6969

7070
throw new \UnexpectedValueException(sprintf(
71-
'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s',
71+
'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.',
7272
get_class($guardAuthenticator),
7373
is_object($response) ? get_class($response) : gettype($response)
7474
));
@@ -117,7 +117,7 @@ public function handleAuthenticationFailure(AuthenticationException $authenticat
117117
}
118118

119119
throw new \UnexpectedValueException(sprintf(
120-
'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s',
120+
'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.',
121121
get_class($guardAuthenticator),
122122
is_object($response) ? get_class($response) : gettype($response)
123123
));

Guard/Provider/GuardAuthenticationProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(array $guardAuthenticators, UserProviderInterface $u
5252
public function authenticate(TokenInterface $token)
5353
{
5454
if (!$this->supports($token)) {
55-
throw new \InvalidArgumentException('GuardAuthenticationProvider only supports NonAuthenticatedGuardToken');
55+
throw new \InvalidArgumentException('GuardAuthenticationProvider only supports GuardTokenInterface.');
5656
}
5757

5858
if (!$token instanceof PreAuthenticationGuardToken) {
@@ -87,7 +87,7 @@ public function authenticate(TokenInterface $token)
8787
}
8888

8989
throw new \LogicException(sprintf(
90-
'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators!?',
90+
'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators.',
9191
$token->getGuardProviderKey()
9292
));
9393
}
@@ -99,7 +99,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
9999

100100
if (!$user instanceof UserInterface) {
101101
throw new \UnexpectedValueException(sprintf(
102-
'The %s::authenticate method must return a UserInterface. You returned %s',
102+
'The %s::authenticate method must return a UserInterface. You returned %s.',
103103
get_class($guardAuthenticator),
104104
is_object($user) ? get_class($user) : gettype($user)
105105
));
@@ -113,7 +113,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
113113
$authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey);
114114
if (!$authenticatedToken instanceof TokenInterface) {
115115
throw new \UnexpectedValueException(sprintf(
116-
'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s',
116+
'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s.',
117117
get_class($guardAuthenticator),
118118
is_object($authenticatedToken) ? get_class($authenticatedToken) : gettype($authenticatedToken)
119119
));

Guard/Token/PreAuthenticationGuardToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ public function getCredentials()
5151

5252
public function setAuthenticated($authenticated)
5353
{
54-
throw new \Exception('The PreAuthenticationGuardToken is *always* not authenticated');
54+
throw new \LogicException('The PreAuthenticationGuardToken is *always* not authenticated.');
5555
}
5656
}

0 commit comments

Comments
 (0)