From baf4850329415d384c579aac2c0d3d63b17d317b Mon Sep 17 00:00:00 2001 From: emargareten <2771355@gmail.com> Date: Thu, 2 Mar 2023 15:14:58 +0200 Subject: [PATCH] add default value to `method` parameter --- src/Actions/ConfirmTwoFactorAuthentication.php | 2 +- src/TwoFactorAuthenticatable.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Actions/ConfirmTwoFactorAuthentication.php b/src/Actions/ConfirmTwoFactorAuthentication.php index 485a95c..3c238f2 100644 --- a/src/Actions/ConfirmTwoFactorAuthentication.php +++ b/src/Actions/ConfirmTwoFactorAuthentication.php @@ -22,7 +22,7 @@ public function __construct(protected TwoFactorProvider $provider) * * @param \App\Models\User $user */ - public function __invoke($user, string $code, ?string $method): void + public function __invoke($user, string $code, ?string $method = null): void { if (empty($user->two_factor_secret) || empty($code) diff --git a/src/TwoFactorAuthenticatable.php b/src/TwoFactorAuthenticatable.php index e610457..3934c58 100644 --- a/src/TwoFactorAuthenticatable.php +++ b/src/TwoFactorAuthenticatable.php @@ -103,7 +103,7 @@ public function disableTwoFactorAuthentication(): void /** * Confirm two-factor authentication for the user. */ - public function confirmTwoFactorAuthentication(string $code, ?string $method): void + public function confirmTwoFactorAuthentication(string $code, ?string $method = null): void { app(ConfirmTwoFactorAuthentication::class)($this, $code, $method); }