Skip to content

Commit 9286538

Browse files
chore: fix/add type hints where possible
Signed-off-by: Josh <[email protected]>
1 parent 21aca17 commit 9286538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/Middleware/TwoFactorMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
* @throws TwoFactorAuthRequiredException if 2FA must be completed before proceeding.
5454
* @throws UserAlreadyLoggedInException if attempting to access a 2FA challenge after completing 2FA.
5555
*/
56-
public function beforeController($controller, $methodName) {
56+
public function beforeController(Controller $controller, string $methodName) {
5757
$isChallengeController = $controller instanceof TwoFactorChallengeController;
5858
$isSetupController = $controller instanceof ALoginSetupController;
5959

@@ -139,10 +139,10 @@ public function beforeController($controller, $methodName) {
139139
* @param Controller $controller The active controller instance.
140140
* @param string $methodName The invoked method name.
141141
* @param Exception $exception The exception that was thrown.
142-
* @return RedirectResponse|null
142+
* @return RedirectResponse
143143
* @throws Exception For anything not related to 2FA flow.
144144
*/
145-
public function afterException($controller, $methodName, Exception $exception) {
145+
public function afterException(Controller $controller, string $methodName, Exception $exception) {
146146
if ($exception instanceof TwoFactorAuthRequiredException) {
147147
$params = [
148148
'redirect_url' => $this->request->getParam('redirect_url'),

0 commit comments

Comments
 (0)