Skip to content
Permalink
Browse files

refactor: remove switch case

  • Loading branch information...
tarlepp committed Jun 1, 2019
1 parent acc7fe4 commit 5779d70605c0843d9f0a8fb9db3655a0c9e21c10
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/EventSubscriber/LockedUserSubscriber.php
@@ -147,13 +147,10 @@ public function onAuthenticationSuccess(Event $event): void
*/
private function checkLockedAccount(User $user, LexikBaseEvent $event): void
{
switch (true) {
case $event instanceof AuthenticationFailureEvent:
$this->onAuthenticationFailureEvent($user);
break;
case $event instanceof AuthenticationSuccessEvent:
$this->onAuthenticationSuccessEvent($user);
break;
if ($event instanceof AuthenticationFailureEvent) {
$this->onAuthenticationFailureEvent($user);
} elseif ($event instanceof AuthenticationSuccessEvent) {
$this->onAuthenticationSuccessEvent($user);
}
}

0 comments on commit 5779d70

Please sign in to comment.
You can’t perform that action at this time.