Skip to content

Commit

Permalink
Fixed code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Jun 22, 2024
1 parent ec0e78d commit af6f41c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Concerns/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

trait Aliases
{
protected function fromAlias(LocaleData|LocaleCode|string|null $locale): ?string
protected function fromAlias(LocaleCode|LocaleData|string|null $locale): ?string
{
if ($locale = $this->stringify($locale)) {
return collect($this->aliases())->flip()->get($locale, $locale);
Expand All @@ -32,7 +32,7 @@ protected function fromAlias(LocaleData|LocaleCode|string|null $locale): ?string
return null;
}

protected function toAlias(LocaleData|LocaleCode|string|null $locale): ?string
protected function toAlias(LocaleCode|LocaleData|string|null $locale): ?string
{
if ($locale = $this->stringify($locale)) {
return collect($this->aliases())->get($locale, $locale);
Expand All @@ -46,7 +46,7 @@ protected function aliases(): array
return Config::shared()->aliases->all();
}

protected function stringify(LocaleData|LocaleCode|string|null $locale): ?string
protected function stringify(LocaleCode|LocaleData|string|null $locale): ?string
{
return match (true) {
$locale instanceof LocaleData => $locale->code,
Expand Down
6 changes: 3 additions & 3 deletions src/Services/Locales.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ public function protects(bool $withCountries = false, bool $withCurrencies = fal
);
}

public function isAvailable(LocaleData|Locale|string|null $locale): bool
public function isAvailable(Locale|LocaleData|string|null $locale): bool
{
return $this->raw->isAvailable($locale);
}

public function isInstalled(LocaleData|Locale|string|null $locale): bool
public function isInstalled(Locale|LocaleData|string|null $locale): bool
{
return $this->raw->isInstalled($locale);
}

public function isProtected(LocaleData|Locale|string|null $locale): bool
public function isProtected(Locale|LocaleData|string|null $locale): bool
{
return $this->raw->isProtected($locale);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/RawLocales.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function protects(): array
])->filter()->unique()->sort()->values()->all());
}

public function isAvailable(LocaleData|Locale|string|null $locale): bool
public function isAvailable(Locale|LocaleData|string|null $locale): bool
{
$locales = $this->available();

Expand Down

0 comments on commit af6f41c

Please sign in to comment.