Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Sep 7, 2024
1 parent 07daa55 commit 770d0c4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/Events/LocaleHasBeenSetEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ class LocaleHasBeenSetEvent

public function __construct(
public LocaleData $locale
) {}
) {
}
}
3 changes: 2 additions & 1 deletion src/Middlewares/LocalizationByModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Constants/LocaleValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
4 changes: 2 additions & 2 deletions tests/Unit/Helpers/LocalizedRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 770d0c4

Please # to comment.