Passed
Branch master (b889f0)
by Marco
02:59
created
Category
Environment.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function getYiiEnv()
91 91
     {
92
-        return $this->modeToYiiEnvMap[$this->mode];
92
+        return $this->modeToYiiEnvMap[ $this->mode ];
93 93
     }
94 94
 
95 95
     /**
@@ -196,15 +196,15 @@  discard block
 block discarded – undo
196 196
         $config = $this->getConfig();
197 197
 
198 198
         // Set attributes
199
-        $this->yiiDebug = $config['yiiDebug'];
200
-        $this->configWeb = $config['configWeb'];
201
-        $this->configWeb['params']['environment'] = strtolower($this->mode);
199
+        $this->yiiDebug = $config[ 'yiiDebug' ];
200
+        $this->configWeb = $config[ 'configWeb' ];
201
+        $this->configWeb[ 'params' ][ 'environment' ] = strtolower($this->mode);
202 202
 
203 203
         // Set console attributes and related actions
204
-        if (isset($config['configConsole']) && !empty($config['configConsole'])) {
205
-            $this->configConsole = $config['configConsole'];
204
+        if (isset($config[ 'configConsole' ]) && !empty($config[ 'configConsole' ])) {
205
+            $this->configConsole = $config[ 'configConsole' ];
206 206
             $this->processInherits($this->configConsole); // Process configConsole for inherits
207
-            $this->configConsole['params']['environment'] = strtolower($this->mode);
207
+            $this->configConsole[ 'params' ][ 'environment' ] = strtolower($this->mode);
208 208
         }
209 209
     }
210 210
 
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
     {
223 223
         foreach ($b as $k => $v) {
224 224
             if (is_integer($k)) {
225
-                $a[] = $v;
226
-            } elseif (is_array($v) && isset($a[$k]) && is_array($a[$k])) {
227
-                $a[$k] = self::mergeArray($a[$k], $v);
225
+                $a[ ] = $v;
226
+            } elseif (is_array($v) && isset($a[ $k ]) && is_array($a[ $k ])) {
227
+                $a[ $k ] = self::mergeArray($a[ $k ], $v);
228 228
             } else {
229
-                $a[$k] = $v;
229
+                $a[ $k ] = $v;
230 230
             }
231 231
         }
232 232
         return $a;
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
      * @param array $array target array
238 238
      * @param array $path array that keeps track of current path
239 239
      */
240
-    private function processInherits(&$array, $path = [])
240
+    private function processInherits(&$array, $path = [ ])
241 241
     {
242 242
         foreach ($array as $key => &$value) {
243 243
             if (is_array($value)) {
244
-                $this->processInherits($value, array_merge($path, [$key]));
244
+                $this->processInherits($value, array_merge($path, [ $key ]));
245 245
             }
246 246
 
247 247
             if ($value === self::INHERIT_KEY) {
248
-                $value = $this->getValueFromArray($this->configWeb, array_reverse(array_merge($path, [$key])));
248
+                $value = $this->getValueFromArray($this->configWeb, array_reverse(array_merge($path, [ $key ])));
249 249
             }
250 250
         }
251 251
     }
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
     {
261 261
         if (count($path) > 1) {
262 262
             $key = end($path);
263
-            return $this->getValueFromArray($array[array_pop($path)], $path);
263
+            return $this->getValueFromArray($array[ array_pop($path) ], $path);
264 264
         } else {
265
-            return $array[reset($path)];
265
+            return $array[ reset($path) ];
266 266
         }
267 267
     }
268 268
 }
Please login to merge, or discard this patch.
example-config/mode_production.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                 'targets' => [
28 28
                     [
29 29
                         'class' => yii\log\FileTarget::class,
30
-                        'levels' => ['error', 'warning'],
30
+                        'levels' => [ 'error', 'warning' ],
31 31
                     ],
32 32
                 ],
33 33
             ],
@@ -38,6 +38,6 @@  discard block
 block discarded – undo
38 38
     // console application properties can be configured here.
39 39
     // Leave array empty if not used.
40 40
     // Use value 'inherit' to copy from generated configWeb.
41
-    'configConsole' => []
41
+    'configConsole' => [ ]
42 42
     
43 43
 ];
Please login to merge, or discard this patch.
example-config/mode_test.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
                 'targets' => [
30 30
                     [
31 31
                         'class' => yii\log\FileTarget::class,
32
-                        'levels' => ['error', 'warning', 'info'],
32
+                        'levels' => [ 'error', 'warning', 'info' ],
33 33
                     ],
34 34
                 ],
35 35
             ],
@@ -43,6 +43,6 @@  discard block
 block discarded – undo
43 43
     // console application properties can be configured here.
44 44
     // Leave array empty if not used.
45 45
     // Use value 'inherit' to copy from generated configWeb.
46
-    'configConsole' => []
46
+    'configConsole' => [ ]
47 47
     
48 48
 ];
Please login to merge, or discard this patch.
example-config/local.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
     // console application properties can be configured here.
23 23
     // Leave array empty if not used.
24 24
     // Use value 'inherit' to copy from generated configWeb.
25
-    'configConsole' => []
25
+    'configConsole' => [ ]
26 26
     
27 27
 ];
Please login to merge, or discard this patch.
example-config/mode_staging.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                 'targets' => [
27 27
                     [
28 28
                         'class' => yii\log\FileTarget::class,
29
-                        'levels' => ['error', 'warning'],
29
+                        'levels' => [ 'error', 'warning' ],
30 30
                     ],
31 31
                 ],
32 32
             ],
@@ -37,6 +37,6 @@  discard block
 block discarded – undo
37 37
     // console application properties can be configured here.
38 38
     // Leave array empty if not used.
39 39
     // Use value 'inherit' to copy from generated configWeb.
40
-    'configConsole' => []
40
+    'configConsole' => [ ]
41 41
     
42 42
 ];
Please login to merge, or discard this patch.
example-config/mode_development.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     // This is the specific Web application configuration for this mode.
17 17
     // Supplied config elements will be merged into the main config array.
18 18
     'configWeb' => [
19
-        'bootstrap' => ['debug', 'gii'],
19
+        'bootstrap' => [ 'debug', 'gii' ],
20 20
         'components' => [
21 21
             'assetManager' => [
22 22
                 'linkAssets' => true,
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
                 'targets' => [
32 32
                     [
33 33
                         'class' => yii\log\FileTarget::class,
34
-                        'levels' => ['error', 'warning', 'info'],
34
+                        'levels' => [ 'error', 'warning', 'info' ],
35 35
                     ],
36 36
                 ],
37 37
             ],
@@ -53,5 +53,5 @@  discard block
 block discarded – undo
53 53
     // console application properties can be configured here.
54 54
     // Leave array empty if not used.
55 55
     // Use value 'inherit' to copy from generated configWeb.
56
-    'configConsole' => []
56
+    'configConsole' => [ ]
57 57
 ];
Please login to merge, or discard this patch.