@@ -155,8 +155,8 @@ discard block |
||
| 155 | 155 | { |
| 156 | 156 | if (!$directories) { |
| 157 | 157 | $directories = [ |
| 158 | - $path . 'Resources' . DIRECTORY_SEPARATOR . 'translations', |
|
| 159 | - $this->kernelRoot . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . $domain . DIRECTORY_SEPARATOR . 'translations', |
|
| 158 | + $path.'Resources'.DIRECTORY_SEPARATOR.'translations', |
|
| 159 | + $this->kernelRoot.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.$domain.DIRECTORY_SEPARATOR.'translations', |
|
| 160 | 160 | ]; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -221,12 +221,12 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | private function flatten($array, $prefix = '') { |
| 223 | 223 | $result = []; |
| 224 | - foreach($array as $key=>$value) { |
|
| 225 | - if(is_array($value)) { |
|
| 226 | - $result = $result + $this->flatten($value, $prefix . $key . '.'); |
|
| 224 | + foreach ($array as $key=>$value) { |
|
| 225 | + if (is_array($value)) { |
|
| 226 | + $result = $result + $this->flatten($value, $prefix.$key.'.'); |
|
| 227 | 227 | } |
| 228 | 228 | else { |
| 229 | - $result[$prefix . $key] = $value; |
|
| 229 | + $result[$prefix.$key] = $value; |
|
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | return $result; |
@@ -224,8 +224,7 @@ |
||
| 224 | 224 | foreach($array as $key=>$value) { |
| 225 | 225 | if(is_array($value)) { |
| 226 | 226 | $result = $result + $this->flatten($value, $prefix . $key . '.'); |
| 227 | - } |
|
| 228 | - else { |
|
| 227 | + } else { |
|
| 229 | 228 | $result[$prefix . $key] = $value; |
| 230 | 229 | } |
| 231 | 230 | } |