Skip to content

Commit ca0aaa7

Browse files
committed
Leverage non-capturing catches
1 parent 9aeb160 commit ca0aaa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

User/ChainUserProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function loadUserByIdentifier(string $identifier): UserInterface
5959
foreach ($this->providers as $provider) {
6060
try {
6161
return $provider->loadUserByIdentifier($identifier);
62-
} catch (UserNotFoundException $e) {
62+
} catch (UserNotFoundException) {
6363
// try next one
6464
}
6565
}
@@ -83,9 +83,9 @@ public function refreshUser(UserInterface $user): UserInterface
8383
}
8484

8585
return $provider->refreshUser($user);
86-
} catch (UnsupportedUserException $e) {
86+
} catch (UnsupportedUserException) {
8787
// try next one
88-
} catch (UserNotFoundException $e) {
88+
} catch (UserNotFoundException) {
8989
$supportedUserFound = true;
9090
// try next one
9191
}
@@ -124,7 +124,7 @@ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string
124124
if ($provider instanceof PasswordUpgraderInterface) {
125125
try {
126126
$provider->upgradePassword($user, $newHashedPassword);
127-
} catch (UnsupportedUserException $e) {
127+
} catch (UnsupportedUserException) {
128128
// ignore: password upgrades are opportunistic
129129
}
130130
}

0 commit comments

Comments
 (0)