@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $fileName = $this->getCacheFileName($name); |
| 32 | 32 | |
| 33 | - file_put_contents($fileName, "<?php \n//@codingStandardsIgnoreFile" . PHP_EOL . $content); |
|
| 33 | + file_put_contents($fileName, "<?php \n//@codingStandardsIgnoreFile".PHP_EOL.$content); |
|
| 34 | 34 | @chmod($fileName, 0777); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | protected function dumpVariableToCache(string $name, $variable) |
| 42 | 42 | { |
| 43 | - $this->dumpCacheFile($name, 'return ' . var_export($variable, true) . ';'); |
|
| 43 | + $this->dumpCacheFile($name, 'return '.var_export($variable, true).';'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -49,6 +49,6 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | private function getCacheFileName($name) |
| 51 | 51 | { |
| 52 | - return ROOT . 'cache/' . basename($name, '.php') . '.php'; |
|
| 52 | + return ROOT.'cache/'.basename($name, '.php').'.php'; |
|
| 53 | 53 | } |
| 54 | 54 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | class CompilerPass implements CompilerPassInterface |
| 18 | 18 | { |
| 19 | 19 | |
| 20 | - const CACHE_FILE = ROOT . 'cache/translation_token'; |
|
| 20 | + const CACHE_FILE = ROOT.'cache/translation_token'; |
|
| 21 | 21 | const TAG = 'middleware'; |
| 22 | 22 | |
| 23 | 23 | use FileCacheTrait; |
@@ -93,16 +93,16 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | ksort($tokens); |
| 95 | 95 | |
| 96 | - $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function (Token $token) { |
|
| 96 | + $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function(Token $token) { |
|
| 97 | 97 | return sprintf('_("%s")', addslashes($token->token)); |
| 98 | 98 | }, $tokens))); |
| 99 | 99 | |
| 100 | - $contentHtml = sprintf("%s", implode("\n", array_map(function (Token $token) { |
|
| 100 | + $contentHtml = sprintf("%s", implode("\n", array_map(function(Token $token) { |
|
| 101 | 101 | return sprintf('<span translate>%s</span>', addslashes($token->token)); |
| 102 | 102 | }, $tokens))); |
| 103 | 103 | |
| 104 | 104 | $this->dumpCacheFile(self::CACHE_FILE, $contentPhp); |
| 105 | - file_put_contents(self::CACHE_FILE . '.html', $contentHtml); |
|
| 106 | - chmod(self::CACHE_FILE . '.html', 0777); |
|
| 105 | + file_put_contents(self::CACHE_FILE.'.html', $contentHtml); |
|
| 106 | + chmod(self::CACHE_FILE.'.html', 0777); |
|
| 107 | 107 | } |
| 108 | 108 | } |