From 9c199dc7d58cfadf83fad1505efd16a0766fc7fc Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:12:08 +0100 Subject: [PATCH] Fix case typo in filename --- ...ngChanged.php => StoreIconsInDatabaseSettingChanged.php} | 4 ++-- app/Listeners/ToggleIconReplicationToDatabase.php | 4 ++-- app/Providers/EventServiceProvider.php | 4 ++-- app/Services/SettingService.php | 4 ++-- tests/Feature/Services/SettingServiceTest.php | 6 +++--- .../Unit/Events/storeIconsInDatabaseSettingChangedTest.php | 6 +++--- .../Unit/Listeners/ToggleIconReplicationToDatabaseTest.php | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) rename app/Events/{storeIconsInDatabaseSettingChanged.php => StoreIconsInDatabaseSettingChanged.php} (80%) diff --git a/app/Events/storeIconsInDatabaseSettingChanged.php b/app/Events/StoreIconsInDatabaseSettingChanged.php similarity index 80% rename from app/Events/storeIconsInDatabaseSettingChanged.php rename to app/Events/StoreIconsInDatabaseSettingChanged.php index 8e00507f..08411fa2 100644 --- a/app/Events/storeIconsInDatabaseSettingChanged.php +++ b/app/Events/StoreIconsInDatabaseSettingChanged.php @@ -5,7 +5,7 @@ use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Support\Facades\Log; -class storeIconsInDatabaseSettingChanged +class StoreIconsInDatabaseSettingChanged { use Dispatchable; @@ -22,6 +22,6 @@ class storeIconsInDatabaseSettingChanged public function __construct(bool $newValue) { $this->newValue = $newValue; - Log::info('storeIconsInDatabaseSettingChanged event dispatched'); + Log::info('StoreIconsInDatabaseSettingChanged event dispatched'); } } diff --git a/app/Listeners/ToggleIconReplicationToDatabase.php b/app/Listeners/ToggleIconReplicationToDatabase.php index 37233f31..d5f20eba 100644 --- a/app/Listeners/ToggleIconReplicationToDatabase.php +++ b/app/Listeners/ToggleIconReplicationToDatabase.php @@ -2,7 +2,7 @@ namespace App\Listeners; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use App\Facades\IconStore; class ToggleIconReplicationToDatabase @@ -15,7 +15,7 @@ public function __construct() {} /** * Handle the event. */ - public function handle(storeIconsInDatabaseSettingChanged $event) : void + public function handle(StoreIconsInDatabaseSettingChanged $event) : void { IconStore::setDatabaseReplication($event->newValue); } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 8a9a6be9..c198d743 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -5,7 +5,7 @@ use App\Events\GroupDeleted; use App\Events\GroupDeleting; use App\Events\ScanForNewReleaseCalled; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use App\Events\TwoFAccountDeleted; use App\Events\VisitedByProxyUser; use App\Listeners\Authentication\FailedLoginListener; @@ -71,7 +71,7 @@ class EventServiceProvider extends ServiceProvider VisitedByProxyUser::class => [ VisitedByProxyUserListener::class, ], - storeIconsInDatabaseSettingChanged::class => [ + StoreIconsInDatabaseSettingChanged::class => [ ToggleIconReplicationToDatabase::class, ], ]; diff --git a/app/Services/SettingService.php b/app/Services/SettingService.php index cc48da31..6a471e21 100644 --- a/app/Services/SettingService.php +++ b/app/Services/SettingService.php @@ -2,7 +2,7 @@ namespace App\Services; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use App\Exceptions\DbEncryptionException; use App\Models\Option; use Exception; @@ -79,7 +79,7 @@ public function set($setting, $value) : void } if ($setting === 'storeIconsInDatabase') { - storeIconsInDatabaseSettingChanged::dispatch($value); + StoreIconsInDatabaseSettingChanged::dispatch($value); } Option::updateOrCreate(['key' => $setting], ['value' => $this->replaceBoolean($value)]); diff --git a/tests/Feature/Services/SettingServiceTest.php b/tests/Feature/Services/SettingServiceTest.php index e640a256..88e8ae96 100644 --- a/tests/Feature/Services/SettingServiceTest.php +++ b/tests/Feature/Services/SettingServiceTest.php @@ -2,7 +2,7 @@ namespace Tests\Feature\Services; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use App\Exceptions\FailedIconStoreDatabaseTogglingException; use App\Facades\IconStore; use App\Facades\Settings; @@ -370,12 +370,12 @@ public function test_cache_is_updated_when_setting_is_deleted() public function test_set_storeIconsInDatabase_setting_dispatches_storeIconsInDatabaseSettingChanged() { Event::fake([ - storeIconsInDatabaseSettingChanged::class, + StoreIconsInDatabaseSettingChanged::class, ]); Settings::set('storeIconsInDatabase', true); - Event::assertDispatched(storeIconsInDatabaseSettingChanged::class); + Event::assertDispatched(StoreIconsInDatabaseSettingChanged::class); } #[Test] diff --git a/tests/Unit/Events/storeIconsInDatabaseSettingChangedTest.php b/tests/Unit/Events/storeIconsInDatabaseSettingChangedTest.php index 5e954524..ce440815 100644 --- a/tests/Unit/Events/storeIconsInDatabaseSettingChangedTest.php +++ b/tests/Unit/Events/storeIconsInDatabaseSettingChangedTest.php @@ -2,7 +2,7 @@ namespace Tests\Unit\Events; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; @@ -10,14 +10,14 @@ /** * storeIconsInDatabaseSettingChangedTest test class */ -#[CoversClass(storeIconsInDatabaseSettingChanged::class)] +#[CoversClass(StoreIconsInDatabaseSettingChanged::class)] class storeIconsInDatabaseSettingChangedTest extends TestCase { #[Test] public function test_event_constructor() { $newValue = true; - $event = new storeIconsInDatabaseSettingChanged($newValue); + $event = new StoreIconsInDatabaseSettingChanged($newValue); $this->assertSame($newValue, $event->newValue); } diff --git a/tests/Unit/Listeners/ToggleIconReplicationToDatabaseTest.php b/tests/Unit/Listeners/ToggleIconReplicationToDatabaseTest.php index 302a96d8..3ad5e3a0 100644 --- a/tests/Unit/Listeners/ToggleIconReplicationToDatabaseTest.php +++ b/tests/Unit/Listeners/ToggleIconReplicationToDatabaseTest.php @@ -2,7 +2,7 @@ namespace Tests\Unit\Listeners; -use App\Events\storeIconsInDatabaseSettingChanged; +use App\Events\StoreIconsInDatabaseSettingChanged; use App\Listeners\ToggleIconReplicationToDatabase; use Illuminate\Support\Facades\Event; use PHPUnit\Framework\Attributes\CoversClass; @@ -21,7 +21,7 @@ public function test_ToggleIconReplicationToDatabase_listen_to_storeIconsInDatab Event::fake(); Event::assertListening( - storeIconsInDatabaseSettingChanged::class, + StoreIconsInDatabaseSettingChanged::class, ToggleIconReplicationToDatabase::class ); }