@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | private function generateHash(Translations $translations): string |
| 58 | 58 | { |
| 59 | - $array = array_map(function (Translation $t) { |
|
| 59 | + $array = array_map(function(Translation $t) { |
|
| 60 | 60 | return [ |
| 61 | 61 | $t->getOriginal(), |
| 62 | 62 | $t->getPlural(), |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $t->getPluralTranslations(), |
| 65 | 65 | $t->getContext(), |
| 66 | 66 | ]; |
| 67 | - }, (array)$translations); |
|
| 67 | + }, (array) $translations); |
|
| 68 | 68 | |
| 69 | 69 | return substr(md5(serialize($array)), 0, 6); // Take only 6, and pray for no collisions |
| 70 | 70 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | throw new InvalidPathException('Directory does not exist (' . $this->config->getMoDirectory() . ')'); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - return (bool)file_put_contents($pathname, json_encode($revisions->toArray(), JSON_PRETTY_PRINT)); |
|
| 131 | + return (bool) file_put_contents($pathname, json_encode($revisions->toArray(), JSON_PRETTY_PRINT)); |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
@@ -155,12 +155,12 @@ |
||
| 155 | 155 | |
| 156 | 156 | // If extensions are set, filter other files out |
| 157 | 157 | if (!empty($item->extensions)) { |
| 158 | - $files = array_filter($files, function ($file) use ($item) { |
|
| 158 | + $files = array_filter($files, function($file) use ($item) { |
|
| 159 | 159 | return in_array($file['extension'], $item->extensions); |
| 160 | 160 | }); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - return array_map(function ($file) use ($dir) { |
|
| 163 | + return array_map(function($file) use ($dir) { |
|
| 164 | 164 | return $dir . DIRECTORY_SEPARATOR . $file['path']; |
| 165 | 165 | }, $files); |
| 166 | 166 | } |