@@ -247,8 +247,9 @@ discard block |
||
247 | 247 | |
248 | 248 | if ($outdated) { |
249 | 249 | $config = $this->load($this->langFilePath); |
250 | - if ($this->mergeFallback) |
|
251 | - $config = array_replace_recursive($this->load($this->getConfigFilename($this->fallbackLang)), $config); |
|
250 | + if ($this->mergeFallback) { |
|
251 | + $config = array_replace_recursive($this->load($this->getConfigFilename($this->fallbackLang)), $config); |
|
252 | + } |
|
252 | 253 | |
253 | 254 | $compiled = "<?php class " . $this->prefix . " {\n" |
254 | 255 | . $this->compile($config) |
@@ -257,8 +258,9 @@ discard block |
||
257 | 258 | . "\n}\n}\n" |
258 | 259 | . $this->compileFunction(); |
259 | 260 | |
260 | - if( ! is_dir($this->cachePath)) |
|
261 | - mkdir($this->cachePath, 0755, true); |
|
261 | + if( ! is_dir($this->cachePath)) { |
|
262 | + mkdir($this->cachePath, 0755, true); |
|
263 | + } |
|
262 | 264 | |
263 | 265 | if (file_put_contents($this->cacheFilePath, $compiled) === FALSE) { |
264 | 266 | throw new Exception("Could not write cache file to path '" . $this->cacheFilePath . "'. Is it writable?"); |
@@ -283,8 +285,9 @@ discard block |
||
283 | 285 | |
284 | 286 | public function l($message, $context = []): string |
285 | 287 | { |
286 | - foreach($context as $i => $context_message) |
|
287 | - $context[$i] = $this->l($context_message); |
|
288 | + foreach($context as $i => $context_message) { |
|
289 | + $context[$i] = $this->l($context_message); |
|
290 | + } |
|
288 | 291 | |
289 | 292 | return call_user_func($this->prefix, $message, $context); |
290 | 293 | } |