From 02f9e5ab09a2c1ccda6be832f7f9cb720f2a25ea Mon Sep 17 00:00:00 2001 From: emargareten <2771355@gmail.com> Date: Wed, 1 Mar 2023 20:00:41 +0200 Subject: [PATCH] style fixes --- src/Actions/TwoFactorRedirector.php | 6 +++--- tests/OrchestraTestCase.php | 2 -- tests/TestUser.php | 1 + tests/TwoFactorAuthenticationChallengeTest.php | 2 -- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Actions/TwoFactorRedirector.php b/src/Actions/TwoFactorRedirector.php index 10deeb0..2e715c0 100644 --- a/src/Actions/TwoFactorRedirector.php +++ b/src/Actions/TwoFactorRedirector.php @@ -30,7 +30,7 @@ public function redirect(Request $request): ?Response /** * Get the two-factor authentication enabled response. * - * @param \App\Models\User $user + * @param \App\Models\User $user */ protected function twoFactorChallengeResponse(Request $request, $user): Response { @@ -44,8 +44,8 @@ protected function twoFactorChallengeResponse(Request $request, $user): Response TwoFactorAuthenticationChallenged::dispatch($user); return $request->wantsJson() - ? response()->json(['two_factor' => true]) - : redirect()->route('two-factor-challenge.create'); + ? response()->json(['two_factor' => true]) + : redirect()->route('two-factor-challenge.create'); } /** diff --git a/tests/OrchestraTestCase.php b/tests/OrchestraTestCase.php index 1fc1924..278bf24 100644 --- a/tests/OrchestraTestCase.php +++ b/tests/OrchestraTestCase.php @@ -3,8 +3,6 @@ namespace Emargareten\TwoFactor\Tests; use Emargareten\TwoFactor\ServiceProvider; -use Emargareten\TwoFactor\TwoFactorAuthenticatable; -use Illuminate\Foundation\Auth\User; use Orchestra\Testbench\TestCase; abstract class OrchestraTestCase extends TestCase diff --git a/tests/TestUser.php b/tests/TestUser.php index f0c10f6..87f9319 100644 --- a/tests/TestUser.php +++ b/tests/TestUser.php @@ -17,6 +17,7 @@ * @property string|null $two_factor_secret * @property array|null $two_factor_recovery_codes * @property \Illuminate\Support\Carbon|null $two_factor_confirmed_at + * * @method static TestUser create(array $attributes = []) */ class TestUser extends User diff --git a/tests/TwoFactorAuthenticationChallengeTest.php b/tests/TwoFactorAuthenticationChallengeTest.php index 72c1b61..4aa1ad2 100644 --- a/tests/TwoFactorAuthenticationChallengeTest.php +++ b/tests/TwoFactorAuthenticationChallengeTest.php @@ -2,8 +2,6 @@ namespace Emargareten\TwoFactor\Tests; -use Emargareten\TwoFactor\TwoFactorAuthenticatable; -use Illuminate\Foundation\Auth\User; use PragmaRX\Google2FA\Google2FA; class TwoFactorAuthenticationChallengeTest extends OrchestraTestCase