@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function getLocaleDirectory(string $locale, ?string $directory = null): string |
| 103 | 103 | { |
| 104 | - if ($directory !== null) { |
|
| 105 | - return \rtrim($directory, '/') . '/' . $locale . '/'; |
|
| 104 | + if ($directory !== null){ |
|
| 105 | + return \rtrim($directory, '/').'/'.$locale.'/'; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - return \rtrim($this->getLocalesDirectory(), '/') . '/' . $locale . '/'; |
|
| 108 | + return \rtrim($this->getLocalesDirectory(), '/').'/'.$locale.'/'; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -114,11 +114,11 @@ discard block |
||
| 114 | 114 | public function resolveDomain(string $bundle): string |
| 115 | 115 | { |
| 116 | 116 | $bundle = \strtolower(\str_replace(['/', '\\'], '-', $bundle)); |
| 117 | - $domains = (array) ($this->config['domains'] ?? []); |
|
| 117 | + $domains = (array)($this->config['domains'] ?? []); |
|
| 118 | 118 | |
| 119 | - foreach ($domains as $domain => $patterns) { |
|
| 120 | - foreach ($patterns as $pattern) { |
|
| 121 | - if ($this->matcher->matches($bundle, $pattern)) { |
|
| 119 | + foreach ($domains as $domain => $patterns){ |
|
| 120 | + foreach ($patterns as $pattern){ |
|
| 121 | + if ($this->matcher->matches($bundle, $pattern)){ |
|
| 122 | 122 | return $domain; |
| 123 | 123 | } |
| 124 | 124 | } |