Skip to content

Commit 8f41d29

Browse files
committed
Remove unnecessary null check
1 parent 671aeab commit 8f41d29

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Authentication/AuthenticatorManager.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ private function executeAuthenticator(AuthenticatorInterface $authenticator, Req
171171
$authenticatedToken->eraseCredentials();
172172
}
173173

174-
if (null !== $this->eventDispatcher) {
175-
$this->eventDispatcher->dispatch(new AuthenticationSuccessEvent($authenticatedToken), AuthenticationEvents::AUTHENTICATION_SUCCESS);
176-
}
174+
$this->eventDispatcher->dispatch(new AuthenticationSuccessEvent($authenticatedToken), AuthenticationEvents::AUTHENTICATION_SUCCESS);
177175

178176
if (null !== $this->logger) {
179177
$this->logger->info('Authenticator successful!', ['token' => $authenticatedToken, 'authenticator' => \get_class($authenticator)]);

0 commit comments

Comments
 (0)