Adding periods at the end of exceptions, and changing one class name to LogicException thanks to @iltar

This commit is contained in:
Ryan Weaver 2015-05-18 08:51:00 -04:00
parent eb158cbdb3
commit d6937218be
4 changed files with 8 additions and 8 deletions

View File

@ -162,7 +162,7 @@ class GuardAuthenticationListener implements ListenerInterface
if (null === $this->rememberMeServices) {
if (null !== $this->logger) {
$this->logger->info('Remember me skipped: it is not configured for the firewall', array('authenticator' => get_class($guardAuthenticator)));
$this->logger->info('Remember me skipped: it is not configured for the firewall.', array('authenticator' => get_class($guardAuthenticator)));
}
return;

View File

@ -68,7 +68,7 @@ class GuardAuthenticatorHandler
}
throw new \UnexpectedValueException(sprintf(
'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s',
'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)
));
@ -117,7 +117,7 @@ class GuardAuthenticatorHandler
}
throw new \UnexpectedValueException(sprintf(
'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s',
'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)
));

View File

@ -52,7 +52,7 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface
public function authenticate(TokenInterface $token)
{
if (!$this->supports($token)) {
throw new \InvalidArgumentException('GuardAuthenticationProvider only supports NonAuthenticatedGuardToken');
throw new \InvalidArgumentException('GuardAuthenticationProvider only supports GuardTokenInterface.');
}
if (!$token instanceof PreAuthenticationGuardToken) {
@ -87,7 +87,7 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface
}
throw new \LogicException(sprintf(
'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators!?',
'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators.',
$token->getGuardProviderKey()
));
}
@ -99,7 +99,7 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface
if (!$user instanceof UserInterface) {
throw new \UnexpectedValueException(sprintf(
'The %s::authenticate method must return a UserInterface. You returned %s',
'The %s::authenticate method must return a UserInterface. You returned %s.',
get_class($guardAuthenticator),
is_object($user) ? get_class($user) : gettype($user)
));
@ -113,7 +113,7 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface
$authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey);
if (!$authenticatedToken instanceof TokenInterface) {
throw new \UnexpectedValueException(sprintf(
'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s',
'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s.',
get_class($guardAuthenticator),
is_object($authenticatedToken) ? get_class($authenticatedToken) : gettype($authenticatedToken)
));

View File

@ -51,6 +51,6 @@ class PreAuthenticationGuardToken extends AbstractToken implements GuardTokenInt
public function setAuthenticated($authenticated)
{
throw new \Exception('The PreAuthenticationGuardToken is *always* not authenticated');
throw new \LogicException('The PreAuthenticationGuardToken is *always* not authenticated.');
}
}