Skip to content

Commit

Permalink
make more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Feb 21, 2024
1 parent 98fa89a commit 6ed9873
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Concerns/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ trait Translatable
public function translate(string $country, string $name, ?string $locale = null): string
{
if ($locale === null) {
if ($this->defaultLocale()) {
$locale = $this->defaultLocale();
} else {
return $name;
}
return $name;

}

if ($locale === $this->defaultLocale()) {
Expand Down

0 comments on commit 6ed9873

Please sign in to comment.