@@ -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,16 +258,16 @@ 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?"); |
265 | 267 | } |
266 | 268 | try{ |
267 | 269 | chmod($this->cacheFilePath, 0755); |
268 | - } |
|
269 | - catch(\Throwable $t){ |
|
270 | + } catch(\Throwable $t){ |
|
270 | 271 | throw new \Exception("Could chmod cache file '" . $this->cacheFilePath . "'"); |
271 | 272 | } |
272 | 273 | |
@@ -289,8 +290,9 @@ discard block |
||
289 | 290 | |
290 | 291 | public function l($message, $context = []): string |
291 | 292 | { |
292 | - foreach($context as $i => $context_message) |
|
293 | - $context[$i] = $this->l($context_message); |
|
293 | + foreach($context as $i => $context_message) { |
|
294 | + $context[$i] = $this->l($context_message); |
|
295 | + } |
|
294 | 296 | |
295 | 297 | return call_user_func($this->prefix, $message, $context); |
296 | 298 | } |