From 770d0c4c10674fbee0c9280b65461b0b648b07b9 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 7 Sep 2024 12:58:10 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Events/LocaleHasBeenSetEvent.php | 3 ++- src/Middlewares/LocalizationByModel.php | 3 ++- tests/Constants/LocaleValue.php | 6 +++--- tests/Unit/Helpers/LocalizedRouteTest.php | 4 ++-- .../migrations/2024_06_20_000000_create_users_table.php | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Events/LocaleHasBeenSetEvent.php b/src/Events/LocaleHasBeenSetEvent.php index 0fd123b..cc9c1ab 100644 --- a/src/Events/LocaleHasBeenSetEvent.php +++ b/src/Events/LocaleHasBeenSetEvent.php @@ -16,5 +16,6 @@ class LocaleHasBeenSetEvent public function __construct( public LocaleData $locale - ) {} + ) { + } } diff --git a/src/Middlewares/LocalizationByModel.php b/src/Middlewares/LocalizationByModel.php index f9831b8..bf4684c 100644 --- a/src/Middlewares/LocalizationByModel.php +++ b/src/Middlewares/LocalizationByModel.php @@ -11,7 +11,8 @@ class LocalizationByModel extends Middleware { public function __construct( protected ?string $guard = null, - ) {} + ) { + } protected function detect(Request $request): bool|float|int|string|null { diff --git a/tests/Constants/LocaleValue.php b/tests/Constants/LocaleValue.php index 54385cd..ac11d24 100644 --- a/tests/Constants/LocaleValue.php +++ b/tests/Constants/LocaleValue.php @@ -6,10 +6,10 @@ class LocaleValue { - public const LocaleAlias = 'de-DE'; + public const LocaleAlias = 'de-DE'; public const LocaleAliasParent = 'de'; - public const LocaleMain = 'fr'; + public const LocaleMain = 'fr'; public const TranslationFrench = 'Toutes les données ont été chargées.'; public const TranslationGerman = 'Alle Ressourcen geladen.'; - public const TranslationKey = 'Foo'; + public const TranslationKey = 'Foo'; } diff --git a/tests/Unit/Helpers/LocalizedRouteTest.php b/tests/Unit/Helpers/LocalizedRouteTest.php index 753d04a..5ef8597 100644 --- a/tests/Unit/Helpers/LocalizedRouteTest.php +++ b/tests/Unit/Helpers/LocalizedRouteTest.php @@ -6,8 +6,8 @@ use Tests\Constants\LocaleValue; test('route groups', function () { - $name = Config::shared()->routes->namePrefix; - $locale = LocaleValue::LocaleMain; + $name = Config::shared()->routes->namePrefix; + $locale = LocaleValue::LocaleMain; $fallback = LocaleValue::LocaleAliasParent; expect(localizedRoute($name . 'via.group.facade', ['foo' => 'bar'])) diff --git a/tests/database/migrations/2024_06_20_000000_create_users_table.php b/tests/database/migrations/2024_06_20_000000_create_users_table.php index 2c4a7cf..bc60ebd 100644 --- a/tests/database/migrations/2024_06_20_000000_create_users_table.php +++ b/tests/database/migrations/2024_06_20_000000_create_users_table.php @@ -6,7 +6,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ public function up(): void { Schema::create('users', function (Blueprint $table) {