Completed
Push — master ( d260a2...c2a5df )
by
unknown
02:40
created
src/Charcoal/Translator/Script/TranslationParserScript.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
 
214 214
     /**
215 215
      * Available locales (languages)
216
-     * @return array Locales.
216
+     * @return string[] Locales.
217 217
      */
218 218
     protected function locales()
219 219
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $filePath = str_replace('/', DIRECTORY_SEPARATOR, $base.$output);
161 161
 
162 162
         $this->climate()->backgroundGreen()->out(
163
-            'Make sure to include <light_green>' . $filePath . '</light_green> in your <light_green>translator/paths</light_green> configurations.'
163
+            'Make sure to include <light_green>'.$filePath.'</light_green> in your <light_green>translator/paths</light_green> configurations.'
164 164
         );
165 165
 
166 166
         return $response;
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
         );
178 178
 
179 179
         $this->climate()->green()->out(
180
-            'CSV file output: <white>' . $this->filePath() . '</white>'
180
+            'CSV file output: <white>'.$this->filePath().'</white>'
181 181
         );
182 182
 
183 183
         $this->climate()->green()->out(
184
-            'CSV file names: <white>' . $this->domain().'.{locale}.csv</white>'
184
+            'CSV file names: <white>'.$this->domain().'.{locale}.csv</white>'
185 185
         );
186 186
 
187 187
         $this->climate()->green()->out(
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         $path = $this->path();
302 302
 
303 303
         if ($path) {
304
-            $this->climate()->green()->out('Parsing files in <white>' . $path .'</white>');
304
+            $this->climate()->green()->out('Parsing files in <white>'.$path.'</white>');
305 305
             $translations = $this->getTranslationsFromPath($path, 'mustache');
306 306
             $translations = array_merge($translations, $this->getTranslationsFromPath($path, 'php'));
307 307
             return $translations;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
         $translations = [];
313 313
         foreach ($paths as $p) {
314
-            $this->climate()->green()->out('Parsing files in <white>' . $p .'</white>');
314
+            $this->climate()->green()->out('Parsing files in <white>'.$p.'</white>');
315 315
             $translations = array_merge_recursive($translations, $this->getTranslationsFromPath($p, 'mustache'));
316 316
             $translations = array_merge_recursive($translations, $this->getTranslationsFromPath($p, 'php'));
317 317
         }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
                 $t = count($array[$index]);
358 358
                 $locales = $this->locales();
359 359
 
360
-                for (; $i<$t; $i++) {
360
+                for (; $i < $t; $i++) {
361 361
                     $this->climate()->inline('.');
362 362
                     $orig = $array[$index][$i];
363 363
                     foreach ($locales as $lang) {
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             }
372 372
         }
373 373
         $this->climate()->out('.');
374
-        $this->climate()->green()->out('Translations parsed from ' . $path);
374
+        $this->climate()->green()->out('Translations parsed from '.$path);
375 375
         return $translations;
376 376
     }
377 377
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $max = $this->maxRecursiveLevel();
387 387
         $i = 1;
388 388
         $files = glob($pattern, $flags);
389
-        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR|GLOB_NOSORT)) as $dir) {
389
+        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR | GLOB_NOSORT)) as $dir) {
390 390
             $files = array_merge($files, $this->globRecursive($dir.'/'.basename($pattern), $flags));
391 391
             $i++;
392 392
             // if ($i >= $max) {
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     {
446 446
         if (!count($translations)) {
447 447
             $this->climate()->error('
448
-                There was no translations in the provided path ('. $this->path() .')
448
+                There was no translations in the provided path ('. $this->path().')
449 449
                 with the given recursive level ('.$this->maxRecursiveLevel().')
450 450
             ');
451 451
             return $this;
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             }
472 472
 
473 473
             foreach ($trans as $key => $translation) {
474
-                $data = [ $key, $translation ];
474
+                $data = [$key, $translation];
475 475
                 fputcsv($file, $data, $separator, $enclosure);
476 476
             }
477 477
             fclose($file);
Please login to merge, or discard this patch.