summaryrefslogtreecommitdiffstats
path: root/Core/User/ChainUserProvider.php
diff options
context:
space:
mode:
authorJavier Eguiluz <javier.eguiluz@gmail.com>2015-06-10 20:30:03 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-06-15 18:26:34 +0200
commit36cde602d02d84b7a176912a8e01ed8e3c7ab85c (patch)
tree72b9f8f8c1a0dd48b833ebcf77da14b19d569b4d /Core/User/ChainUserProvider.php
parent86642118470f5301b4e29b8fb7d3dfe876c2e83e (diff)
downloadsymfony-security-36cde602d02d84b7a176912a8e01ed8e3c7ab85c.zip
symfony-security-36cde602d02d84b7a176912a8e01ed8e3c7ab85c.tar.gz
symfony-security-36cde602d02d84b7a176912a8e01ed8e3c7ab85c.tar.bz2
Standardize the name of the exception variables
Diffstat (limited to 'Core/User/ChainUserProvider.php')
-rw-r--r--Core/User/ChainUserProvider.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Core/User/ChainUserProvider.php b/Core/User/ChainUserProvider.php
index 6e14a4f..8604ddc 100644
--- a/Core/User/ChainUserProvider.php
+++ b/Core/User/ChainUserProvider.php
@@ -47,7 +47,7 @@ class ChainUserProvider implements UserProviderInterface
foreach ($this->providers as $provider) {
try {
return $provider->loadUserByUsername($username);
- } catch (UsernameNotFoundException $notFound) {
+ } catch (UsernameNotFoundException $e) {
// try next one
}
}
@@ -67,18 +67,18 @@ class ChainUserProvider implements UserProviderInterface
foreach ($this->providers as $provider) {
try {
return $provider->refreshUser($user);
- } catch (UnsupportedUserException $unsupported) {
+ } catch (UnsupportedUserException $e) {
// try next one
- } catch (UsernameNotFoundException $notFound) {
+ } catch (UsernameNotFoundException $e) {
$supportedUserFound = true;
// try next one
}
}
if ($supportedUserFound) {
- $ex = new UsernameNotFoundException(sprintf('There is no user with name "%s".', $user->getUsername()));
- $ex->setUsername($user->getUsername());
- throw $ex;
+ $e = new UsernameNotFoundException(sprintf('There is no user with name "%s".', $user->getUsername()));
+ $e->setUsername($user->getUsername());
+ throw $e;
} else {
throw new UnsupportedUserException(sprintf('The account "%s" is not supported.', get_class($user)));
}