Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Remove unnecessary check, return type will make sure it's Response
Browse files Browse the repository at this point in the history
  • Loading branch information
scheb committed Mar 7, 2018
1 parent 2d8b595 commit ddce1d6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Security/Http/Firewall/TwoFactorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ private function onFailure(Request $request, AuthenticationException $failed): R
$this->dispatchLoginEvent(TwoFactorAuthenticationEvents::FAILURE, $request, $this->tokenStorage->getToken());

$response = $this->failureHandler->onAuthenticationFailure($request, $failed);
if (!($response instanceof Response)) {
throw new \RuntimeException('Authentication failure handler did not return a Response.');
}

return $response;
}
Expand All @@ -208,9 +205,6 @@ private function onSuccess(Request $request, TokenInterface $token): Response
}

$response = $this->successHandler->onAuthenticationSuccess($request, $token);
if (!($response instanceof Response)) {
throw new \RuntimeException('Authentication success handler did not return a Response.');
}

return $response;
}
Expand Down

0 comments on commit ddce1d6

Please sign in to comment.