Skip to content

Commit

Permalink
add default value to method parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
emargareten committed Mar 2, 2023
1 parent 82af1f1 commit baf4850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Actions/ConfirmTwoFactorAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/TwoFactorAuthenticatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit baf4850

Please sign in to comment.