Passed
Push — master ( 4e7cc4...d260a2 )
by
unknown
02:49
created
src/Charcoal/Translator/ServiceProvider/TranslatorServiceProvider.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Pimple\Container;
6 6
 use Pimple\ServiceProviderInterface;
7
-
8 7
 use Symfony\Component\Translation\Loader\ArrayLoader;
9 8
 use Symfony\Component\Translation\Loader\CsvFileLoader;
10 9
 use Symfony\Component\Translation\Loader\IcuDatFileLoader;
@@ -17,7 +16,6 @@  discard block
 block discarded – undo
17 16
 use Symfony\Component\Translation\Loader\XliffFileLoader;
18 17
 use Symfony\Component\Translation\Loader\JsonFileLoader;
19 18
 use Symfony\Component\Translation\Loader\YamlFileLoader;
20
-
21 19
 use Charcoal\Translator\LocalesConfig;
22 20
 use Charcoal\Translator\LocalesManager;
23 21
 use Charcoal\Translator\Translator;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
          * @param  Container $container Pimple DI container.
126 126
          * @return array
127 127
          */
128
-        $container['locales/manager'] = function (Container $container) {
128
+        $container['locales/manager'] = function(Container $container) {
129 129
             return new LocalesManager([
130 130
                 'locales'             => $container['locales/languages'],
131 131
                 'default_language'    => $container['locales/default-language'],
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
          * @param  Container $container Pimple DI container.
145 145
          * @return TranslatorConfig
146 146
          */
147
-        $container['translator/config'] = function (Container $container) {
147
+        $container['translator/config'] = function(Container $container) {
148 148
             $config = isset($container['config']) ? $container['config'] : [];
149 149
             $translatorConfig = isset($config['translator']) ? $config['translator'] : null;
150 150
             return new TranslatorConfig($translatorConfig);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
          * @param  Container $container Pimple DI container.
155 155
          * @return array
156 156
          */
157
-        $container['translator/translations'] = function (Container $container) {
157
+        $container['translator/translations'] = function(Container $container) {
158 158
             $translatorConfig = $container['translator/config'];
159 159
             return $translatorConfig['translations'];
160 160
         };
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         /**
163 163
          * @return MessageSelector
164 164
          */
165
-        $container['translator/message-selector'] = function () {
165
+        $container['translator/message-selector'] = function() {
166 166
             return null;
167 167
         };
168 168
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
          * @param  Container $container Pimple DI container.
172 172
          * @return Translator
173 173
          */
174
-        $container['translator'] = function (Container $container) {
174
+        $container['translator'] = function(Container $container) {
175 175
 
176 176
             $translatorConfig = $container['translator/config'];
177 177
             $translator = new Translator([
Please login to merge, or discard this patch.
src/Charcoal/Translator/Translator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *
30 30
      * @var string[]
31 31
      */
32
-    private $domains = [ 'messages' ];
32
+    private $domains = ['messages'];
33 33
 
34 34
     /**
35 35
      * @param array $data Constructor data.
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         if (is_array($val)) {
267 267
             return !!array_filter(
268 268
                 $val,
269
-                function ($v, $k) {
269
+                function($v, $k) {
270 270
                     if (is_string($k) && strlen($k) > 0) {
271 271
                         if (is_string($v) && strlen($v) > 0) {
272 272
                             return true;
Please login to merge, or discard this patch.
src/Charcoal/Translator/Script/TranslationParserScript.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
     /**
206 206
      * Available locales (languages)
207
-     * @return array Locales.
207
+     * @return string[] Locales.
208 208
      */
209 209
     protected function locales()
210 210
     {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 
379 379
     /**
380 380
      * Custom path
381
-     * @return [type] [description]
381
+     * @return string [description]
382 382
      */
383 383
     public function path()
384 384
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 
10 10
 // Intra-module (`charcoal-admin`) dependencies
11 11
 use Charcoal\Admin\AdminScript;
12
-
13 12
 use Charcoal\Translator\TranslatorAwareTrait;
14 13
 
15 14
 /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                 $t = count($array[$index]);
338 338
                 $locales = $this->locales();
339 339
 
340
-                for (; $i<$t; $i++) {
340
+                for (; $i < $t; $i++) {
341 341
                     $this->climate()->inline('.');
342 342
                     $orig = $array[$index][$i];
343 343
                     foreach ($locales as $lang) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
         $max = $this->maxRecursiveLevel();
367 367
         $i = 1;
368 368
         $files = glob($pattern, $flags);
369
-        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR|GLOB_NOSORT)) as $dir) {
369
+        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR | GLOB_NOSORT)) as $dir) {
370 370
             $files = array_merge($files, $this->globRecursive($dir.'/'.basename($pattern), $flags));
371 371
             $i++;
372 372
             if ($i >= $max) {
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             }
448 448
 
449 449
             foreach ($trans as $key => $translation) {
450
-                $data = [ $key, $translation ];
450
+                $data = [$key, $translation];
451 451
                 fputcsv($file, $data, $separator, $enclosure);
452 452
             }
453 453
             fclose($file);
Please login to merge, or discard this patch.