@@ -513,15 +513,15 @@ |
||
| 513 | 513 | */ |
| 514 | 514 | public static function translator(?string $locale = null, bool $shared = true): Translate |
| 515 | 515 | { |
| 516 | - if (null === $locale || $locale === '' || $locale === '0') { |
|
| 517 | - $locale = static::request()->getLocale(); |
|
| 518 | - } |
|
| 516 | + if (null === $locale || $locale === '' || $locale === '0') { |
|
| 517 | + $locale = static::request()->getLocale(); |
|
| 518 | + } |
|
| 519 | 519 | |
| 520 | - if (true === $shared && isset(static::$instances[Translate::class])) { |
|
| 520 | + if (true === $shared && isset(static::$instances[Translate::class])) { |
|
| 521 | 521 | return static::$instances[Translate::class]->setLocale($locale); |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | - return static::$instances[Translate::class] = new Translate($locale, static::locator()); |
|
| 524 | + return static::$instances[Translate::class] = new Translate($locale, static::locator()); |
|
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | /** |