瀏覽代碼

Fix case typo in filename

Bubka 8 月之前
父節點
當前提交
9c199dc7d5

+ 2 - 2
app/Events/storeIconsInDatabaseSettingChanged.php → app/Events/StoreIconsInDatabaseSettingChanged.php

@@ -5,7 +5,7 @@ namespace App\Events;
 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');
     }
 }

+ 2 - 2
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 @@ class ToggleIconReplicationToDatabase
     /**
      * Handle the event.
      */
-    public function handle(storeIconsInDatabaseSettingChanged $event) : void
+    public function handle(StoreIconsInDatabaseSettingChanged $event) : void
     {
         IconStore::setDatabaseReplication($event->newValue);
     }

+ 2 - 2
app/Providers/EventServiceProvider.php

@@ -5,7 +5,7 @@ namespace App\Providers;
 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,
         ],
     ];

+ 2 - 2
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 @@ class SettingService
         }
 
         if ($setting === 'storeIconsInDatabase') {
-            storeIconsInDatabaseSettingChanged::dispatch($value);
+            StoreIconsInDatabaseSettingChanged::dispatch($value);
         }
 
         Option::updateOrCreate(['key' => $setting], ['value' => $this->replaceBoolean($value)]);

+ 3 - 3
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 @@ class SettingServiceTest extends FeatureTestCase
     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]

+ 3 - 3
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 @@ use Tests\TestCase;
 /**
  * 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);
     }

+ 2 - 2
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 @@ class ToggleIconReplicationToDatabaseTest extends TestCase
         Event::fake();
 
         Event::assertListening(
-            storeIconsInDatabaseSettingChanged::class,
+            StoreIconsInDatabaseSettingChanged::class,
             ToggleIconReplicationToDatabase::class
         );
     }