Completed
Push — master ( 5576ee...a16f3a )
by Mārtiņš
02:02
created
src/MessageRevisions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/MessageExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,12 +155,12 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/MessageStorage.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $item->key = $this->getKey($locale, $domain, $translation);
250 250
         $item->domain = $domain;
251 251
         $item->locale = $locale;
252
-        $item->context = (string)$translation->getContext();
252
+        $item->context = (string) $translation->getContext();
253 253
         $item->original = $translation->getOriginal();
254 254
         $item->translation = $translation->getTranslation();
255 255
         $item->originalPlural = $translation->getPlural();
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
     {
294 294
         return $this->convertItems(
295 295
             $locale,
296
-            (string)$domain,
297
-            $this->repository->getAll($locale, (string)$domain)
296
+            (string) $domain,
297
+            $this->repository->getAll($locale, (string) $domain)
298 298
         );
299 299
     }
300 300
 
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
     {
310 310
         return $this->convertItems(
311 311
             $locale,
312
-            (string)$domain,
313
-            $this->repository->getEnabled($locale, (string)$domain)
312
+            (string) $domain,
313
+            $this->repository->getEnabled($locale, (string) $domain)
314 314
         );
315 315
     }
316 316
 
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public function getEnabledTranslated(string $locale, $domain): Translations
325 325
     {
326
-        $items = $this->repository->getEnabledTranslated($locale, (string)$domain);
326
+        $items = $this->repository->getEnabledTranslated($locale, (string) $domain);
327 327
 
328
-        return $this->convertItems($locale, (string)$domain, $items);
328
+        return $this->convertItems($locale, (string) $domain, $items);
329 329
     }
330 330
 
331 331
     /**
@@ -337,9 +337,9 @@  discard block
 block discarded – undo
337 337
      */
338 338
     public function getEnabledTranslatedJs(string $locale, $domain): Translations
339 339
     {
340
-        $items = $this->repository->getEnabledTranslatedJs($locale, (string)$domain);
340
+        $items = $this->repository->getEnabledTranslatedJs($locale, (string) $domain);
341 341
 
342
-        return $this->convertItems($locale, (string)$domain, $items);
342
+        return $this->convertItems($locale, (string) $domain, $items);
343 343
     }
344 344
 
345 345
     /**
@@ -353,8 +353,8 @@  discard block
 block discarded – undo
353 353
     {
354 354
         return $this->convertItems(
355 355
             $locale,
356
-            (string)$domain,
357
-            $this->repository->getRequiresTranslating($locale, (string)$domain)
356
+            (string) $domain,
357
+            $this->repository->getRequiresTranslating($locale, (string) $domain)
358 358
         );
359 359
     }
360 360
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      */
369 369
     private function convertItems(string $locale, $domain, array $items): Translations
370 370
     {
371
-        $domain = (string)$domain;
371
+        $domain = (string) $domain;
372 372
 
373 373
         $translations = new Translations;
374 374
         $translations->setDomain($domain);
Please login to merge, or discard this patch.