diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 3c7c00c..3bdcd16 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -1,5 +1,7 @@ ignore($userId), ]; diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 8677cd5..6455f33 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,8 +1,7 @@ canManageTwoFactor = Features::canManageTwoFactorAuthentication(); if ($this->canManageTwoFactor) { - if (Fortify::confirmsTwoFactorAuthentication() && is_null(auth()->user()->two_factor_confirmed_at)) { + if (Fortify::confirmsTwoFactorAuthentication() && null === auth()->user()->two_factor_confirmed_at) { $disableTwoFactorAuthentication(auth()->user()); } @@ -100,7 +102,7 @@ public function enable(EnableTwoFactorAuthentication $enableTwoFactorAuthenticat { $enableTwoFactorAuthentication(auth()->user()); - if (! $this->requiresConfirmation) { + if ( ! $this->requiresConfirmation) { $this->twoFactorEnabled = auth()->user()->hasEnabledTwoFactorAuthentication(); } @@ -109,23 +111,6 @@ public function enable(EnableTwoFactorAuthentication $enableTwoFactorAuthenticat $this->showModal = true; } - /** - * Load the two-factor authentication setup data for the user. - */ - private function loadSetupData(): void - { - $user = auth()->user(); - - try { - $this->qrCodeSvg = $user?->twoFactorQrCodeSvg(); - $this->manualSetupKey = decrypt($user->two_factor_secret); - } catch (Exception) { - $this->addError('setupData', 'Failed to fetch setup data.'); - - $this->reset('qrCodeSvg', 'manualSetupKey'); - } - } - /** * Show the two-factor verification step if necessary. */ @@ -191,7 +176,7 @@ public function closeModal(): void $this->resetErrorBag(); - if (! $this->requiresConfirmation) { + if ( ! $this->requiresConfirmation) { $this->twoFactorEnabled = auth()->user()->hasEnabledTwoFactorAuthentication(); } } @@ -224,4 +209,21 @@ public function modalConfig(): array 'buttonText' => __('Continue'), ]; } + + /** + * Load the two-factor authentication setup data for the user. + */ + private function loadSetupData(): void + { + $user = auth()->user(); + + try { + $this->qrCodeSvg = $user?->twoFactorQrCodeSvg(); + $this->manualSetupKey = decrypt($user->two_factor_secret); + } catch (Exception) { + $this->addError('setupData', 'Failed to fetch setup data.'); + + $this->reset('qrCodeSvg', 'manualSetupKey'); + } + } } diff --git a/app/Livewire/Settings/TwoFactor/RecoveryCodes.php b/app/Livewire/Settings/TwoFactor/RecoveryCodes.php index 7352d80..db7b2f8 100644 --- a/app/Livewire/Settings/TwoFactor/RecoveryCodes.php +++ b/app/Livewire/Settings/TwoFactor/RecoveryCodes.php @@ -1,5 +1,7 @@ */ - use HasFactory, Notifiable, TwoFactorAuthenticatable; + use HasFactory; + use Notifiable; + use TwoFactorAuthenticatable; + + /** + * Get the user's initials + */ + public function initials(): string + { + return Str::of($this->name) + ->explode(' ') + ->take(2) + ->map(fn($word) => Str::substr($word, 0, 1)) + ->implode(''); + } /** * Get the attributes that should be cast. @@ -31,16 +47,4 @@ protected function casts(): array 'password' => 'hashed', ]; } - - /** - * Get the user's initials - */ - public function initials(): string - { - return Str::of($this->name) - ->explode(' ') - ->take(2) - ->map(fn ($word) => Str::substr($word, 0, 1)) - ->implode(''); - } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index f1525e9..a1d2a27 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,5 +1,7 @@ isProduction(), ); - Password::defaults(fn (): ?Password => app()->isProduction() + Password::defaults( + fn(): ?Password => app()->isProduction() ? Password::min(12) ->mixedCase() ->letters() diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 44e57aa..e8bde16 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -1,5 +1,7 @@ view('livewire.auth.login')); - Fortify::verifyEmailView(fn () => view('livewire.auth.verify-email')); - Fortify::twoFactorChallengeView(fn () => view('livewire.auth.two-factor-challenge')); - Fortify::confirmPasswordView(fn () => view('livewire.auth.confirm-password')); - Fortify::registerView(fn () => view('livewire.auth.register')); - Fortify::resetPasswordView(fn () => view('livewire.auth.reset-password')); - Fortify::requestPasswordResetLinkView(fn () => view('livewire.auth.forgot-password')); + Fortify::loginView(fn() => view('livewire.auth.login')); + Fortify::verifyEmailView(fn() => view('livewire.auth.verify-email')); + Fortify::twoFactorChallengeView(fn() => view('livewire.auth.two-factor-challenge')); + Fortify::confirmPasswordView(fn() => view('livewire.auth.confirm-password')); + Fortify::registerView(fn() => view('livewire.auth.register')); + Fortify::resetPasswordView(fn() => view('livewire.auth.reset-password')); + Fortify::requestPasswordResetLinkView(fn() => view('livewire.auth.forgot-password')); } /** @@ -59,12 +58,10 @@ private function configureViews(): void */ private function configureRateLimiting(): void { - RateLimiter::for('two-factor', function (Request $request) { - return Limit::perMinute(5)->by($request->session()->get('login.id')); - }); + RateLimiter::for('two-factor', fn(Request $request) => Limit::perMinute(5)->by($request->session()->get('login.id'))); RateLimiter::for('login', function (Request $request) { - $throttleKey = Str::transliterate(Str::lower($request->input(Fortify::username())).'|'.$request->ip()); + $throttleKey = Str::transliterate(Str::lower($request->input(Fortify::username())) . '|' . $request->ip()); return Limit::perMinute(5)->by($throttleKey); }); diff --git a/bootstrap/app.php b/bootstrap/app.php index c183276..944f4a5 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,18 +1,16 @@ withRouting( - web: __DIR__.'/../routes/web.php', - commands: __DIR__.'/../routes/console.php', + web: __DIR__ . '/../routes/web.php', + commands: __DIR__ . '/../routes/console.php', health: '/up', ) - ->withMiddleware(function (Middleware $middleware): void { - // - }) - ->withExceptions(function (Exceptions $exceptions): void { - // - })->create(); + ->withMiddleware(function (Middleware $middleware): void {}) + ->withExceptions(function (Exceptions $exceptions): void {})->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 5ffd769..4be20b2 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -1,5 +1,7 @@ env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'), + 'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')) . '-cache-'), /* |-------------------------------------------------------------------------- diff --git a/config/database.php b/config/database.php index 64709ce..df64d23 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,7 @@ [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'), + 'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')) . '-database-'), 'persistent' => env('REDIS_PERSISTENT', false), ], diff --git a/config/filesystems.php b/config/filesystems.php index 37d8fca..7d2bbbe 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,5 +1,7 @@ [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => rtrim(env('APP_URL', 'http://localhost'), '/').'/storage', + 'url' => mb_rtrim(env('APP_URL', 'http://localhost'), '/') . '/storage', 'visibility' => 'public', 'throw' => false, 'report' => false, diff --git a/config/fortify.php b/config/fortify.php index ce67e2c..5cc73b8 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -1,5 +1,7 @@ [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), ], 'processors' => [PsrLogMessageProcessor::class], ], diff --git a/config/mail.php b/config/mail.php index e32e88d..0b6ab36 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,5 +1,7 @@ env( 'SESSION_COOKIE', - Str::slug((string) env('APP_NAME', 'laravel')).'-session', + Str::slug((string) env('APP_NAME', 'laravel')) . '-session', ), /* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 98825c8..32d2c94 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,5 +1,7 @@ */ -class UserFactory extends Factory +final class UserFactory extends Factory { /** * The current password being used by the factory. @@ -41,7 +43,7 @@ public function definition(): array */ public function unverified(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn(array $attributes) => [ 'email_verified_at' => null, ]); } @@ -51,7 +53,7 @@ public function unverified(): static */ public function withTwoFactor(): static { - return $this->state(fn (array $attributes) => [ + return $this->state(fn(array $attributes) => [ 'two_factor_secret' => encrypt('secret'), 'two_factor_recovery_codes' => encrypt(json_encode(['recovery-code-1'])), 'two_factor_confirmed_at' => now(), diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 05fb5d9..cfc327e 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -1,17 +1,18 @@ id(); $table->string('name'); $table->string('email')->unique(); @@ -21,13 +22,13 @@ public function up(): void $table->timestamps(); }); - Schema::create('password_reset_tokens', function (Blueprint $table) { + Schema::create('password_reset_tokens', function (Blueprint $table): void { $table->string('email')->primary(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); - Schema::create('sessions', function (Blueprint $table) { + Schema::create('sessions', function (Blueprint $table): void { $table->string('id')->primary(); $table->foreignId('user_id')->nullable()->index(); $table->string('ip_address', 45)->nullable(); diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php index 06dc7a5..6c4fbae 100644 --- a/database/migrations/0001_01_01_000001_create_cache_table.php +++ b/database/migrations/0001_01_01_000001_create_cache_table.php @@ -1,23 +1,24 @@ string('key')->primary(); $table->mediumText('value'); $table->bigInteger('expiration')->index(); }); - Schema::create('cache_locks', function (Blueprint $table) { + Schema::create('cache_locks', function (Blueprint $table): void { $table->string('key')->primary(); $table->string('owner'); $table->bigInteger('expiration')->index(); diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php index 87d3ed7..cf71197 100644 --- a/database/migrations/0001_01_01_000002_create_jobs_table.php +++ b/database/migrations/0001_01_01_000002_create_jobs_table.php @@ -1,17 +1,18 @@ id(); $table->string('queue')->index(); $table->longText('payload'); @@ -21,7 +22,7 @@ public function up(): void $table->unsignedInteger('created_at'); }); - Schema::create('job_batches', function (Blueprint $table) { + Schema::create('job_batches', function (Blueprint $table): void { $table->string('id')->primary(); $table->string('name'); $table->integer('total_jobs'); @@ -34,7 +35,7 @@ public function up(): void $table->integer('finished_at')->nullable(); }); - Schema::create('failed_jobs', function (Blueprint $table) { + Schema::create('failed_jobs', function (Blueprint $table): void { $table->id(); $table->string('uuid')->unique(); $table->text('connection'); diff --git a/database/migrations/2025_08_14_170933_add_two_factor_columns_to_users_table.php b/database/migrations/2025_08_14_170933_add_two_factor_columns_to_users_table.php index 187d974..d2f589c 100644 --- a/database/migrations/2025_08_14_170933_add_two_factor_columns_to_users_table.php +++ b/database/migrations/2025_08_14_170933_add_two_factor_columns_to_users_table.php @@ -1,17 +1,18 @@ text('two_factor_secret')->after('password')->nullable(); $table->text('two_factor_recovery_codes')->after('two_factor_secret')->nullable(); $table->timestamp('two_factor_confirmed_at')->after('two_factor_recovery_codes')->nullable(); @@ -23,7 +24,7 @@ public function up(): void */ public function down(): void { - Schema::table('users', function (Blueprint $table) { + Schema::table('users', function (Blueprint $table): void { $table->dropColumn([ 'two_factor_secret', 'two_factor_recovery_codes', diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index d01a0ef..b275081 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -1,12 +1,14 @@ handleRequest(Request::capture()); diff --git a/routes/console.php b/routes/console.php index 3c9adf1..05f18f2 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,8 +1,10 @@ comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); diff --git a/routes/settings.php b/routes/settings.php index 618957b..1fdabe3 100644 --- a/routes/settings.php +++ b/routes/settings.php @@ -1,18 +1,20 @@ group(function () { +Route::middleware(['auth'])->group(function (): void { Route::redirect('settings', 'settings/profile'); Route::livewire('settings/profile', Profile::class)->name('profile.edit'); }); -Route::middleware(['auth', 'verified'])->group(function () { +Route::middleware(['auth', 'verified'])->group(function (): void { Route::livewire('settings/appearance', Appearance::class)->name('appearance.edit'); Route::livewire('settings/security', Security::class) diff --git a/tests/Feature/Auth/AuthenticationTest.php b/tests/Feature/Auth/AuthenticationTest.php index 2948fc8..ac25ef8 100644 --- a/tests/Feature/Auth/AuthenticationTest.php +++ b/tests/Feature/Auth/AuthenticationTest.php @@ -1,15 +1,17 @@ get(route('login')); $response->assertOk(); }); -test('users can authenticate using the login screen', function () { +test('users can authenticate using the login screen', function (): void { $user = User::factory()->create(); $response = $this->post(route('login.store'), [ @@ -24,7 +26,7 @@ $this->assertAuthenticated(); }); -test('users can not authenticate with invalid password', function () { +test('users can not authenticate with invalid password', function (): void { $user = User::factory()->create(); $response = $this->post(route('login.store'), [ @@ -37,7 +39,7 @@ $this->assertGuest(); }); -test('users with two factor enabled are redirected to two factor challenge', function () { +test('users with two factor enabled are redirected to two factor challenge', function (): void { $this->skipUnlessFortifyHas(Features::twoFactorAuthentication()); Features::twoFactorAuthentication([ @@ -56,7 +58,7 @@ $this->assertGuest(); }); -test('users can logout', function () { +test('users can logout', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user)->post(route('logout')); diff --git a/tests/Feature/Auth/EmailVerificationTest.php b/tests/Feature/Auth/EmailVerificationTest.php index ce043aa..0642168 100644 --- a/tests/Feature/Auth/EmailVerificationTest.php +++ b/tests/Feature/Auth/EmailVerificationTest.php @@ -1,16 +1,18 @@ skipUnlessFortifyHas(Features::emailVerification()); }); -test('email verification screen can be rendered', function () { +test('email verification screen can be rendered', function (): void { $user = User::factory()->unverified()->create(); $response = $this->actingAs($user)->get(route('verification.notice')); @@ -18,7 +20,7 @@ $response->assertOk(); }); -test('email can be verified', function () { +test('email can be verified', function (): void { $user = User::factory()->unverified()->create(); Event::fake(); @@ -34,10 +36,10 @@ Event::assertDispatched(Verified::class); expect($user->fresh()->hasVerifiedEmail())->toBeTrue(); - $response->assertRedirect(route('dashboard', absolute: false).'?verified=1'); + $response->assertRedirect(route('dashboard', absolute: false) . '?verified=1'); }); -test('email is not verified with invalid hash', function () { +test('email is not verified with invalid hash', function (): void { $user = User::factory()->unverified()->create(); $verificationUrl = URL::temporarySignedRoute( @@ -51,7 +53,7 @@ expect($user->fresh()->hasVerifiedEmail())->toBeFalse(); }); -test('already verified user visiting verification link is redirected without firing event again', function () { +test('already verified user visiting verification link is redirected without firing event again', function (): void { $user = User::factory()->create([ 'email_verified_at' => now(), ]); @@ -65,7 +67,7 @@ ); $this->actingAs($user)->get($verificationUrl) - ->assertRedirect(route('dashboard', absolute: false).'?verified=1'); + ->assertRedirect(route('dashboard', absolute: false) . '?verified=1'); expect($user->fresh()->hasVerifiedEmail())->toBeTrue(); Event::assertNotDispatched(Verified::class); diff --git a/tests/Feature/Auth/PasswordConfirmationTest.php b/tests/Feature/Auth/PasswordConfirmationTest.php index 76b5e34..f0fdea1 100644 --- a/tests/Feature/Auth/PasswordConfirmationTest.php +++ b/tests/Feature/Auth/PasswordConfirmationTest.php @@ -1,8 +1,10 @@ create(); $response = $this->actingAs($user)->get(route('password.confirm')); diff --git a/tests/Feature/Auth/RegistrationTest.php b/tests/Feature/Auth/RegistrationTest.php index f9c6493..f4e565d 100644 --- a/tests/Feature/Auth/RegistrationTest.php +++ b/tests/Feature/Auth/RegistrationTest.php @@ -1,18 +1,20 @@ skipUnlessFortifyHas(Features::registration()); }); -test('registration screen can be rendered', function () { +test('registration screen can be rendered', function (): void { $response = $this->get(route('register')); $response->assertOk(); }); -test('new users can register', function () { +test('new users can register', function (): void { $response = $this->post(route('register.store'), [ 'name' => 'John Doe', 'email' => 'test@example.com', diff --git a/tests/Feature/Auth/TwoFactorChallengeTest.php b/tests/Feature/Auth/TwoFactorChallengeTest.php index 70a4fae..cad6093 100644 --- a/tests/Feature/Auth/TwoFactorChallengeTest.php +++ b/tests/Feature/Auth/TwoFactorChallengeTest.php @@ -1,19 +1,21 @@ skipUnlessFortifyHas(Features::twoFactorAuthentication()); }); -test('two factor challenge redirects to login when not authenticated', function () { +test('two factor challenge redirects to login when not authenticated', function (): void { $response = $this->get(route('two-factor.login')); $response->assertRedirect(route('login')); }); -test('two factor challenge can be rendered', function () { +test('two factor challenge can be rendered', function (): void { Features::twoFactorAuthentication([ 'confirm' => true, 'confirmPassword' => true, diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index 95c6a8b..fbea51e 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -1,13 +1,15 @@ get(route('dashboard')); $response->assertRedirect(route('login')); }); -test('authenticated users can visit the dashboard', function () { +test('authenticated users can visit the dashboard', function (): void { $user = User::factory()->create(); $this->actingAs($user); diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index ef7b533..380a02a 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -1,6 +1,8 @@ get(route('home')); $response->assertOk(); diff --git a/tests/Feature/Settings/ProfileUpdateTest.php b/tests/Feature/Settings/ProfileUpdateTest.php index 7dc4899..c07c860 100644 --- a/tests/Feature/Settings/ProfileUpdateTest.php +++ b/tests/Feature/Settings/ProfileUpdateTest.php @@ -1,16 +1,18 @@ actingAs($user = User::factory()->create()); $this->get('/settings/profile')->assertOk(); }); -test('profile information can be updated', function () { +test('profile information can be updated', function (): void { $user = User::factory()->create(); $this->actingAs($user); @@ -29,7 +31,7 @@ expect($user->email_verified_at)->toBeNull(); }); -test('email verification status is unchanged when email address is unchanged', function () { +test('email verification status is unchanged when email address is unchanged', function (): void { $user = User::factory()->create(); $this->actingAs($user); @@ -44,7 +46,7 @@ expect($user->refresh()->email_verified_at)->not->toBeNull(); }); -test('user can delete their account', function () { +test('user can delete their account', function (): void { $user = User::factory()->create(); $this->actingAs($user); @@ -61,7 +63,7 @@ expect(auth()->check())->toBeFalse(); }); -test('correct password must be provided to delete account', function () { +test('correct password must be provided to delete account', function (): void { $user = User::factory()->create(); $this->actingAs($user); diff --git a/tests/Feature/Settings/SecurityTest.php b/tests/Feature/Settings/SecurityTest.php index 65f30e6..e626489 100644 --- a/tests/Feature/Settings/SecurityTest.php +++ b/tests/Feature/Settings/SecurityTest.php @@ -1,12 +1,14 @@ skipUnlessFortifyHas(Features::twoFactorAuthentication()); Features::twoFactorAuthentication([ @@ -15,7 +17,7 @@ ]); }); -test('security settings page can be rendered', function () { +test('security settings page can be rendered', function (): void { $user = User::factory()->create(); $this->actingAs($user) @@ -26,7 +28,7 @@ ->assertSee('Enable 2FA'); }); -test('security settings page requires password confirmation when enabled', function () { +test('security settings page requires password confirmation when enabled', function (): void { $user = User::factory()->create(); $response = $this->actingAs($user) @@ -35,7 +37,7 @@ $response->assertRedirect(route('password.confirm')); }); -test('security settings page renders without two factor when feature is disabled', function () { +test('security settings page renders without two factor when feature is disabled', function (): void { config(['fortify.features' => []]); $user = User::factory()->create(); @@ -48,7 +50,7 @@ ->assertDontSee('Two-factor authentication'); }); -test('two factor authentication disabled when confirmation abandoned between requests', function () { +test('two factor authentication disabled when confirmation abandoned between requests', function (): void { $user = User::factory()->create(); $user->forceFill([ @@ -70,7 +72,7 @@ ]); }); -test('password can be updated', function () { +test('password can be updated', function (): void { $user = User::factory()->create([ 'password' => Hash::make('password'), ]); @@ -88,7 +90,7 @@ expect(Hash::check('new-password', $user->refresh()->password))->toBeTrue(); }); -test('correct password must be provided to update password', function () { +test('correct password must be provided to update password', function (): void { $user = User::factory()->create([ 'password' => Hash::make('password'), ]); diff --git a/tests/Pest.php b/tests/Pest.php index 941e024..4eccbe6 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,5 +1,7 @@ extend('toBeOne', function () { - return $this->toBe(1); -}); +expect()->extend('toBeOne', fn() => $this->toBe(1)); /* |-------------------------------------------------------------------------- @@ -44,7 +44,7 @@ | */ -function something() +function something(): void { // .. } diff --git a/tests/TestCase.php b/tests/TestCase.php index a574f37..f64e620 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,7 @@ markTestSkipped($message ?? "Fortify feature [{$feature}] is not enabled."); } } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 44a4f33..5984fd8 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -1,5 +1,7 @@ toBeTrue(); });