@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function getLocaleDirectory(string $locale, ?string $directory = null): string |
103 | 103 | { |
104 | - if ($directory !== null) { |
|
104 | + if ($directory !== null){ |
|
105 | 105 | return \rtrim($directory, \DIRECTORY_SEPARATOR) |
106 | 106 | . \DIRECTORY_SEPARATOR |
107 | 107 | . $locale |
@@ -121,11 +121,11 @@ discard block |
||
121 | 121 | public function resolveDomain(string $bundle): string |
122 | 122 | { |
123 | 123 | $bundle = \strtolower(\str_replace(['/', '\\'], '-', $bundle)); |
124 | - $domains = (array) ($this->config['domains'] ?? []); |
|
124 | + $domains = (array)($this->config['domains'] ?? []); |
|
125 | 125 | |
126 | - foreach ($domains as $domain => $patterns) { |
|
127 | - foreach ($patterns as $pattern) { |
|
128 | - if ($this->matcher->matches($bundle, $pattern)) { |
|
126 | + foreach ($domains as $domain => $patterns){ |
|
127 | + foreach ($patterns as $pattern){ |
|
128 | + if ($this->matcher->matches($bundle, $pattern)){ |
|
129 | 129 | return $domain; |
130 | 130 | } |
131 | 131 | } |
@@ -101,7 +101,8 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function getLocaleDirectory(string $locale, ?string $directory = null): string |
103 | 103 | { |
104 | - if ($directory !== null) { |
|
104 | + if ($directory !== null) |
|
105 | + { |
|
105 | 106 | return \rtrim($directory, \DIRECTORY_SEPARATOR) |
106 | 107 | . \DIRECTORY_SEPARATOR |
107 | 108 | . $locale |
@@ -123,9 +124,12 @@ discard block |
||
123 | 124 | $bundle = \strtolower(\str_replace(['/', '\\'], '-', $bundle)); |
124 | 125 | $domains = (array) ($this->config['domains'] ?? []); |
125 | 126 | |
126 | - foreach ($domains as $domain => $patterns) { |
|
127 | - foreach ($patterns as $pattern) { |
|
128 | - if ($this->matcher->matches($bundle, $pattern)) { |
|
127 | + foreach ($domains as $domain => $patterns) |
|
128 | + { |
|
129 | + foreach ($patterns as $pattern) |
|
130 | + { |
|
131 | + if ($this->matcher->matches($bundle, $pattern)) |
|
132 | + { |
|
129 | 133 | return $domain; |
130 | 134 | } |
131 | 135 | } |