GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 0557d3...6a35e2 )
by O2System
04:28
created
src/Http/Abstracts/AbstractTransport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getOption($name, $default = null)
54 54
     {
55
-        if ( ! isset($this->options[ $name ])) {
55
+        if ( ! isset($this->options[$name])) {
56 56
             return $default;
57 57
         }
58 58
 
59
-        return $this->options[ $name ];
59
+        return $this->options[$name];
60 60
     }
61 61
 
62 62
     // ------------------------------------------------------------------------
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function setOption($name, $value)
75 75
     {
76
-        $this->options[ $name ] = $value;
76
+        $this->options[$name] = $value;
77 77
 
78 78
         return $this;
79 79
     }
Please login to merge, or discard this patch.
src/Http/Input.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -432,13 +432,13 @@
 block discarded – undo
432 432
         }
433 433
 
434 434
         foreach ([
435
-                     'HTTP_CLIENT_IP',
436
-                     'HTTP_FORWARDED',
437
-                     'HTTP_X_FORWARDED_FOR',
438
-                     'HTTP_X_CLIENT_IP',
439
-                     'HTTP_X_CLUSTER_CLIENT_IP',
440
-                     'REMOTE_ADDR',
441
-                 ] as $header
435
+                        'HTTP_CLIENT_IP',
436
+                        'HTTP_FORWARDED',
437
+                        'HTTP_X_FORWARDED_FOR',
438
+                        'HTTP_X_CLIENT_IP',
439
+                        'HTTP_X_CLUSTER_CLIENT_IP',
440
+                        'REMOTE_ADDR',
441
+                    ] as $header
442 442
         ) {
443 443
             if (null !== ($ipAddress = $this->server($header))) {
444 444
                 if (filter_var($ipAddress, FILTER_VALIDATE_IP)) {
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return;
45 45
         }
46 46
 
47
-        if (isset($_REQUEST[ 'GLOBALS' ])) {
47
+        if (isset($_REQUEST['GLOBALS'])) {
48 48
             die('GLOBALS overwrite attempt detected');
49 49
         }
50 50
 
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES,
55 55
             isset($_SESSION) && is_array($_SESSION) ? $_SESSION : []);
56 56
         foreach ($input as $k => $v) {
57
-            if ( ! in_array($k, $no_unset) && isset($GLOBALS[ $k ])) {
58
-                unset($GLOBALS[ $k ]);
57
+            if ( ! in_array($k, $no_unset) && isset($GLOBALS[$k])) {
58
+                unset($GLOBALS[$k]);
59 59
             }
60 60
         }
61 61
 
@@ -68,51 +68,51 @@  discard block
 block discarded – undo
68 68
         $_SERVER = array_merge($default_server_values, $_SERVER);
69 69
 
70 70
         // Fix for IIS when running with PHP ISAPI
71
-        if (empty($_SERVER[ 'REQUEST_URI' ]) || (PHP_SAPI != 'cgi-fcgi' && preg_match('/^Microsoft-IIS\//',
72
-                    $_SERVER[ 'SERVER_SOFTWARE' ]))) {
71
+        if (empty($_SERVER['REQUEST_URI']) || (PHP_SAPI != 'cgi-fcgi' && preg_match('/^Microsoft-IIS\//',
72
+                    $_SERVER['SERVER_SOFTWARE']))) {
73 73
 
74
-            if (isset($_SERVER[ 'HTTP_X_ORIGINAL_URL' ])) {
74
+            if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
75 75
                 // IIS Mod-Rewrite
76
-                $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ];
77
-            } elseif (isset($_SERVER[ 'HTTP_X_REWRITE_URL' ])) {
76
+                $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
77
+            } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
78 78
                 // IIS Isapi_Rewrite
79
-                $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_REWRITE_URL' ];
79
+                $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
80 80
             } else {
81 81
                 // Use ORIG_PATH_INFO if there is no PATH_INFO
82
-                if ( ! isset($_SERVER[ 'PATH_INFO' ]) && isset($_SERVER[ 'ORIG_PATH_INFO' ])) {
83
-                    $_SERVER[ 'PATH_INFO' ] = $_SERVER[ 'ORIG_PATH_INFO' ];
82
+                if ( ! isset($_SERVER['PATH_INFO']) && isset($_SERVER['ORIG_PATH_INFO'])) {
83
+                    $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
84 84
                 }
85 85
 
86 86
                 // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
87
-                if (isset($_SERVER[ 'PATH_INFO' ])) {
88
-                    if ($_SERVER[ 'PATH_INFO' ] == $_SERVER[ 'SCRIPT_NAME' ]) {
89
-                        $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'PATH_INFO' ];
87
+                if (isset($_SERVER['PATH_INFO'])) {
88
+                    if ($_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME']) {
89
+                        $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
90 90
                     } else {
91
-                        $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'SCRIPT_NAME' ] . $_SERVER[ 'PATH_INFO' ];
91
+                        $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
92 92
                     }
93 93
                 }
94 94
 
95 95
                 // Append the query string if it exists and isn't null
96
-                if ( ! empty($_SERVER[ 'QUERY_STRING' ])) {
97
-                    $_SERVER[ 'REQUEST_URI' ] .= '?' . $_SERVER[ 'QUERY_STRING' ];
96
+                if ( ! empty($_SERVER['QUERY_STRING'])) {
97
+                    $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
98 98
                 }
99 99
             }
100 100
         }
101 101
 
102 102
         // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
103
-        if (isset($_SERVER[ 'SCRIPT_FILENAME' ]) && (strpos($_SERVER[ 'SCRIPT_FILENAME' ],
104
-                    'php.cgi') == strlen($_SERVER[ 'SCRIPT_FILENAME' ]) - 7)) {
105
-            $_SERVER[ 'SCRIPT_FILENAME' ] = $_SERVER[ 'PATH_TRANSLATED' ];
103
+        if (isset($_SERVER['SCRIPT_FILENAME']) && (strpos($_SERVER['SCRIPT_FILENAME'],
104
+                    'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7)) {
105
+            $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
106 106
         }
107 107
 
108 108
         // Fix for Dreamhost and other PHP as CGI hosts
109
-        if (strpos($_SERVER[ 'SCRIPT_NAME' ], 'php.cgi') !== false) {
110
-            unset($_SERVER[ 'PATH_INFO' ]);
109
+        if (strpos($_SERVER['SCRIPT_NAME'], 'php.cgi') !== false) {
110
+            unset($_SERVER['PATH_INFO']);
111 111
         }
112 112
 
113 113
         // Fix empty PHP_SELF
114 114
         if (empty($PHP_SELF)) {
115
-            $_SERVER[ 'PHP_SELF' ] = $PHP_SELF = preg_replace('/(\?.*)?$/', '', $_SERVER[ 'REQUEST_URI' ]);
115
+            $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace('/(\?.*)?$/', '', $_SERVER['REQUEST_URI']);
116 116
         }
117 117
     }
118 118
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         // Use $_GET directly here, since filter_has_var only
138 138
         // checks the initial GET data, not anything that might
139 139
         // have been added since.
140
-        return isset($_GET[ $offset ])
140
+        return isset($_GET[$offset])
141 141
             ? $this->get($offset, $filter)
142 142
             : $this->post($offset, $filter);
143 143
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             $loopThrough = [];
224 224
 
225 225
             foreach ($offset as $key) {
226
-                $loopThrough[ $key ] = $this->filter($type, $key, $filter);
226
+                $loopThrough[$key] = $this->filter($type, $key, $filter);
227 227
             }
228 228
 
229 229
             if (empty($loopThrough)) {
@@ -237,38 +237,38 @@  discard block
 block discarded – undo
237 237
             // of the simpler filter_input();
238 238
             switch ($type) {
239 239
                 case INPUT_GET:
240
-                    $value = isset($_GET[ $offset ])
241
-                        ? $_GET[ $offset ]
240
+                    $value = isset($_GET[$offset])
241
+                        ? $_GET[$offset]
242 242
                         : null;
243 243
                     break;
244 244
                 case INPUT_POST:
245
-                    $value = isset($_POST[ $offset ])
246
-                        ? $_POST[ $offset ]
245
+                    $value = isset($_POST[$offset])
246
+                        ? $_POST[$offset]
247 247
                         : null;
248 248
                     break;
249 249
                 case INPUT_SERVER:
250
-                    $value = isset($_SERVER[ $offset ])
251
-                        ? $_SERVER[ $offset ]
250
+                    $value = isset($_SERVER[$offset])
251
+                        ? $_SERVER[$offset]
252 252
                         : null;
253 253
                     break;
254 254
                 case INPUT_ENV:
255
-                    $value = isset($_ENV[ $offset ])
256
-                        ? $_ENV[ $offset ]
255
+                    $value = isset($_ENV[$offset])
256
+                        ? $_ENV[$offset]
257 257
                         : null;
258 258
                     break;
259 259
                 case INPUT_COOKIE:
260
-                    $value = isset($_COOKIE[ $offset ])
261
-                        ? $_COOKIE[ $offset ]
260
+                    $value = isset($_COOKIE[$offset])
261
+                        ? $_COOKIE[$offset]
262 262
                         : null;
263 263
                     break;
264 264
                 case INPUT_REQUEST:
265
-                    $value = isset($_REQUEST[ $offset ])
266
-                        ? $_REQUEST[ $offset ]
265
+                    $value = isset($_REQUEST[$offset])
266
+                        ? $_REQUEST[$offset]
267 267
                         : null;
268 268
                     break;
269 269
                 case INPUT_SESSION:
270
-                    $value = isset($_SESSION[ $offset ])
271
-                        ? $_SESSION[ $offset ]
270
+                    $value = isset($_SESSION[$offset])
271
+                        ? $_SESSION[$offset]
272 272
                         : null;
273 273
                     break;
274 274
                 default:
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
     {
328 328
         foreach ($data as $key => $value) {
329 329
             if (is_array($value) AND is_array($filter)) {
330
-                $data[ $key ] = filter_var_array($value, $filter);
330
+                $data[$key] = filter_var_array($value, $filter);
331 331
             } elseif (is_array($value)) {
332
-                $data[ $key ] = $this->filterRecursive($value, $filter);
332
+                $data[$key] = $this->filterRecursive($value, $filter);
333 333
             } elseif (isset($filter)) {
334
-                $data[ $key ] = filter_var($value, $filter);
334
+                $data[$key] = filter_var($value, $filter);
335 335
             } else {
336
-                $data[ $key ] = $value;
336
+                $data[$key] = $value;
337 337
             }
338 338
         }
339 339
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         // Use $_POST directly here, since filter_has_var only
383 383
         // checks the initial POST data, not anything that might
384 384
         // have been added since.
385
-        return isset($_POST[ $offset ])
385
+        return isset($_POST[$offset])
386 386
             ? $this->post($offset, $filter)
387 387
             : $this->get($offset, $filter);
388 388
     }
@@ -405,8 +405,8 @@  discard block
 block discarded – undo
405 405
         $uploadFiles = server_request()->getUploadedFiles();
406 406
 
407 407
         if (isset($offset)) {
408
-            if (isset($uploadFiles[ $offset ])) {
409
-                return $uploadFiles[ $offset ];
408
+            if (isset($uploadFiles[$offset])) {
409
+                return $uploadFiles[$offset];
410 410
             }
411 411
         }
412 412
 
@@ -632,6 +632,6 @@  discard block
 block discarded – undo
632 632
      */
633 633
     final public function submit()
634 634
     {
635
-        return (bool)isset($_POST[ 'submit' ]);
635
+        return (bool)isset($_POST['submit']);
636 636
     }
637 637
 }
638 638
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/Router.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             }
114 114
         } else {
115 115
             $uriPath = urldecode(
116
-                parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH)
116
+                parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
117 117
             );
118 118
 
119 119
             $uriPathParts = explode('public/', $uriPath);
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
                 );
228 228
             } elseif (preg_match("/([a-zA-Z0-9\\\]+)(@)([a-zA-Z0-9\\\]+)/", $closure, $matches)) {
229 229
                 $this->setController(
230
-                    (new Router\DataStructures\Controller($matches[ 1 ]))
231
-                        ->setRequestMethod($matches[ 3 ]),
230
+                    (new Router\DataStructures\Controller($matches[1]))
231
+                        ->setRequestMethod($matches[3]),
232 232
                     $uriSegments
233 233
                 );
234 234
             } elseif (is_string($closure) && $closure !== '') {
@@ -317,10 +317,10 @@  discard block
 block discarded – undo
317 317
                         $parameters = $controllerMethodParams;
318 318
                     } else {
319 319
                         foreach ($method->getParameters() as $index => $parameter) {
320
-                            if (isset($uriSegments[ $parameter->name ])) {
321
-                                $parameters[ $index ] = $controllerMethodParams[ $parameter->name ];
320
+                            if (isset($uriSegments[$parameter->name])) {
321
+                                $parameters[$index] = $controllerMethodParams[$parameter->name];
322 322
                             } else {
323
-                                $parameters[ $index ] = null;
323
+                                $parameters[$index] = null;
324 324
                             }
325 325
                         }
326 326
                     }
Please login to merge, or discard this patch.
src/Http/Message/Uri/Path.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
                 break;
65 65
             case 'PATH_INFO':
66 66
             default:
67
-                $this->string = isset($_SERVER[ $protocol ])
68
-                    ? $_SERVER[ $protocol ]
67
+                $this->string = isset($_SERVER[$protocol])
68
+                    ? $_SERVER[$protocol]
69 69
                     : $this->parseRequestUri();
70 70
                 break;
71 71
         }
@@ -90,23 +90,23 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function parseRequestUri()
92 92
     {
93
-        if ( ! isset($_SERVER[ 'REQUEST_URI' ], $_SERVER[ 'SCRIPT_NAME' ])) {
93
+        if ( ! isset($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) {
94 94
             return '';
95 95
         }
96 96
 
97
-        $uri = parse_url($_SERVER[ 'REQUEST_URI' ]);
98
-        $query = isset($uri[ 'query' ])
99
-            ? $uri[ 'query' ]
97
+        $uri = parse_url($_SERVER['REQUEST_URI']);
98
+        $query = isset($uri['query'])
99
+            ? $uri['query']
100 100
             : '';
101
-        $uri = isset($uri[ 'path' ])
102
-            ? $uri[ 'path' ]
101
+        $uri = isset($uri['path'])
102
+            ? $uri['path']
103 103
             : '';
104 104
 
105
-        if (isset($_SERVER[ 'SCRIPT_NAME' ][ 0 ])) {
106
-            if (strpos($uri, $_SERVER[ 'SCRIPT_NAME' ]) === 0) {
107
-                $uri = (string)substr($uri, strlen($_SERVER[ 'SCRIPT_NAME' ]));
108
-            } elseif (strpos($uri, dirname($_SERVER[ 'SCRIPT_NAME' ])) === 0) {
109
-                $uri = (string)substr($uri, strlen(dirname($_SERVER[ 'SCRIPT_NAME' ])));
105
+        if (isset($_SERVER['SCRIPT_NAME'][0])) {
106
+            if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0) {
107
+                $uri = (string)substr($uri, strlen($_SERVER['SCRIPT_NAME']));
108
+            } elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0) {
109
+                $uri = (string)substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
110 110
             }
111 111
         }
112 112
 
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
         // URI is found, and also fixes the QUERY_STRING server var and $_GET array.
115 115
         if (trim($uri, '/') === '' AND strncmp($query, '/', 1) === 0) {
116 116
             $query = explode('?', $query, 2);
117
-            $uri = $query[ 0 ];
117
+            $uri = $query[0];
118 118
 
119
-            $_SERVER[ 'QUERY_STRING' ] = isset($query[ 1 ])
120
-                ? $query[ 1 ]
119
+            $_SERVER['QUERY_STRING'] = isset($query[1])
120
+                ? $query[1]
121 121
                 : '';
122 122
         } else {
123
-            $_SERVER[ 'QUERY_STRING' ] = $query;
123
+            $_SERVER['QUERY_STRING'] = $query;
124 124
         }
125 125
 
126
-        parse_str($_SERVER[ 'QUERY_STRING' ], $_GET);
126
+        parse_str($_SERVER['QUERY_STRING'], $_GET);
127 127
 
128 128
         if ($uri === '/' || $uri === '') {
129 129
             return '/';
@@ -184,21 +184,21 @@  discard block
 block discarded – undo
184 184
      */
185 185
     protected function parseQueryString()
186 186
     {
187
-        $uri = isset($_SERVER[ 'QUERY_STRING' ])
188
-            ? $_SERVER[ 'QUERY_STRING' ]
187
+        $uri = isset($_SERVER['QUERY_STRING'])
188
+            ? $_SERVER['QUERY_STRING']
189 189
             : @getenv('QUERY_STRING');
190 190
 
191 191
         if (trim($uri, '/') === '') {
192 192
             return '';
193 193
         } elseif (strncmp($uri, '/', 1) === 0) {
194 194
             $uri = explode('?', $uri, 2);
195
-            $_SERVER[ 'QUERY_STRING' ] = isset($uri[ 1 ])
196
-                ? $uri[ 1 ]
195
+            $_SERVER['QUERY_STRING'] = isset($uri[1])
196
+                ? $uri[1]
197 197
                 : '';
198
-            $uri = rawurldecode($uri[ 0 ]);
198
+            $uri = rawurldecode($uri[0]);
199 199
         }
200 200
 
201
-        parse_str($_SERVER[ 'QUERY_STRING' ], $_GET);
201
+        parse_str($_SERVER['QUERY_STRING'], $_GET);
202 202
 
203 203
         return $this->removeRelativeDirectory($uri);
204 204
     }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $validSegments = array_filter($validSegments);
235 235
         array_unshift($validSegments, null);
236 236
 
237
-        unset($validSegments[ 0 ]);
237
+        unset($validSegments[0]);
238 238
 
239 239
         $this->segments = $validSegments;
240 240
         $this->string = implode('/', $this->segments);
@@ -273,8 +273,8 @@  discard block
 block discarded – undo
273 273
 
274 274
         // Convert programatic characters to entities and return
275 275
         return str_replace(
276
-            ['$', '(', ')', '%28', '%29', $config->offsetGet('suffix')],    // Bad
277
-            ['$', '(', ')', '(', ')', ''],    // Good
276
+            ['$', '(', ')', '%28', '%29', $config->offsetGet('suffix')], // Bad
277
+            ['$', '(', ')', '(', ')', ''], // Good
278 278
             $segment
279 279
         );
280 280
     }
Please login to merge, or discard this patch.
src/Http/Message/Uri/Domain.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -94,15 +94,15 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function __construct($string = null)
96 96
     {
97
-        $this->origin = isset($_SERVER[ 'HTTP_HOST' ])
98
-            ? $_SERVER[ 'HTTP_HOST' ]
99
-            : $_SERVER[ 'SERVER_NAME' ];
97
+        $this->origin = isset($_SERVER['HTTP_HOST'])
98
+            ? $_SERVER['HTTP_HOST']
99
+            : $_SERVER['SERVER_NAME'];
100 100
         $this->scheme = is_https()
101 101
             ? 'https'
102 102
             : 'http';
103 103
 
104
-        $paths = explode('.php', $_SERVER[ 'PHP_SELF' ]);
105
-        $paths = explode('/', trim($paths[ 0 ], '/'));
104
+        $paths = explode('.php', $_SERVER['PHP_SELF']);
105
+        $paths = explode('/', trim($paths[0], '/'));
106 106
         array_pop($paths);
107 107
 
108 108
         $this->path = empty($paths)
@@ -112,26 +112,26 @@  discard block
 block discarded – undo
112 112
         if (isset($string)) {
113 113
             $this->string = trim($string, '/');
114 114
             $metadata = parse_url($string);
115
-            $metadata[ 'path' ] = empty($metadata[ 'path' ])
115
+            $metadata['path'] = empty($metadata['path'])
116 116
                 ? null
117
-                : $metadata[ 'path' ];
117
+                : $metadata['path'];
118 118
 
119
-            $this->scheme = empty($metadata[ 'scheme' ])
119
+            $this->scheme = empty($metadata['scheme'])
120 120
                 ? $this->scheme
121
-                : $metadata[ 'scheme' ];
121
+                : $metadata['scheme'];
122 122
 
123
-            if ($metadata[ 'path' ] === $this->string) {
123
+            if ($metadata['path'] === $this->string) {
124 124
                 $paths = explode('/', $this->string);
125
-                $this->origin = $paths[ 0 ];
125
+                $this->origin = $paths[0];
126 126
 
127 127
                 $this->path = implode('/', array_slice($paths, 1));
128
-            } elseif (isset($metadata[ 'host' ])) {
129
-                $this->path = trim($metadata[ 'path' ]);
130
-                $this->origin = $metadata[ 'host' ];
128
+            } elseif (isset($metadata['host'])) {
129
+                $this->path = trim($metadata['path']);
130
+                $this->origin = $metadata['host'];
131 131
             }
132 132
         }
133 133
 
134
-        $directories = explode('/', str_replace('\\', '/', dirname($_SERVER[ 'SCRIPT_FILENAME' ])));
134
+        $directories = explode('/', str_replace('\\', '/', dirname($_SERVER['SCRIPT_FILENAME'])));
135 135
         $paths = explode('/', $this->path);
136 136
         $paths = array_intersect($paths, $directories);
137 137
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         }
144 144
 
145 145
         if (preg_match('/(:)([0-9]+)/', $this->string, $matches)) {
146
-            $this->port = $matches[ 2 ];
146
+            $this->port = $matches[2];
147 147
         }
148 148
 
149 149
         if (filter_var($this->origin, FILTER_VALIDATE_IP) !== false) {
@@ -194,12 +194,12 @@  discard block
 block discarded – undo
194 194
             if ((($ordinalNumber % 100) >= 11) && (($ordinalNumber % 100) <= 13)) {
195 195
                 $ordinalKey = $ordinalNumber . 'th';
196 196
             } else {
197
-                $ordinalKey = $ordinalNumber . $ordinalEnds[ $ordinalNumber % 10 ];
197
+                $ordinalKey = $ordinalNumber . $ordinalEnds[$ordinalNumber % 10];
198 198
             }
199 199
 
200
-            $this->subDomains[ $ordinalKey ] = $subdomain;
200
+            $this->subDomains[$ordinalKey] = $subdomain;
201 201
 
202
-            unset($this->subDomains[ $key ]);
202
+            unset($this->subDomains[$key]);
203 203
         }
204 204
 
205 205
         foreach ($this->tlds as $key => $tld) {
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
             if ((($ordinalNumber % 100) >= 11) && (($ordinalNumber % 100) <= 13)) {
209 209
                 $ordinalKey = $ordinalNumber . 'th';
210 210
             } else {
211
-                $ordinalKey = $ordinalNumber . $ordinalEnds[ $ordinalNumber % 10 ];
211
+                $ordinalKey = $ordinalNumber . $ordinalEnds[$ordinalNumber % 10];
212 212
             }
213 213
 
214
-            $this->tlds[ $ordinalKey ] = $tld;
214
+            $this->tlds[$ordinalKey] = $tld;
215 215
 
216
-            unset($this->tlds[ $key ]);
216
+            unset($this->tlds[$key]);
217 217
         }
218 218
     }
219 219
 
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function getSubDomain($level = '3rd')
314 314
     {
315
-        if (isset($this->subDomains[ $level ])) {
316
-            return $this->subDomains[ $level ];
315
+        if (isset($this->subDomains[$level])) {
316
+            return $this->subDomains[$level];
317 317
         }
318 318
 
319 319
         return false;
@@ -356,8 +356,8 @@  discard block
 block discarded – undo
356 356
     {
357 357
         if (is_null($level)) {
358 358
             return implode('.', $this->tlds);
359
-        } elseif (isset($this->tlds[ $level ])) {
360
-            return $this->tlds[ $level ];
359
+        } elseif (isset($this->tlds[$level])) {
360
+            return $this->tlds[$level];
361 361
         }
362 362
 
363 363
         return false;
Please login to merge, or discard this patch.
src/Http/Message/ServerRequest.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
             $this->headers = apache_request_headers();
71 71
         }
72 72
 
73
-        $this->headers[ 'Content-Type' ] = isset($_SERVER[ 'CONTENT_TYPE' ])
74
-            ? $_SERVER[ 'CONTENT_TYPE' ]
73
+        $this->headers['Content-Type'] = isset($_SERVER['CONTENT_TYPE'])
74
+            ? $_SERVER['CONTENT_TYPE']
75 75
             : @getenv(
76 76
                 'CONTENT_TYPE'
77 77
             );
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         foreach ($_SERVER as $key => $val) {
80 80
             if (strpos($key, 'SERVER') !== false) {
81 81
                 $key = str_replace('SERVER_', '', $key);
82
-                $this->serverParams[ $key ] = $val;
82
+                $this->serverParams[$key] = $val;
83 83
             }
84 84
 
85 85
             if (sscanf($key, 'HTTP_%s', $header) === 1) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 $header = str_replace('_', ' ', strtolower($header));
88 88
                 $header = str_replace(' ', '-', ucwords($header));
89 89
 
90
-                $this->headers[ $header ] = $_SERVER[ $key ];
90
+                $this->headers[$header] = $_SERVER[$key];
91 91
             }
92 92
         }
93 93
 
@@ -101,25 +101,25 @@  discard block
 block discarded – undo
101 101
 
102 102
         if (count($_FILES)) {
103 103
             foreach ($_FILES as $key => $value) {
104
-                if (is_array($value[ 'name' ])) {
105
-                    for ($i = 0; $i < count($value[ 'name' ]); $i++) {
106
-                        if ( ! is_array($value[ 'name' ])) {
107
-                            $uploadedFiles[ $key ][ $i ] = $value;
104
+                if (is_array($value['name'])) {
105
+                    for ($i = 0; $i < count($value['name']); $i++) {
106
+                        if ( ! is_array($value['name'])) {
107
+                            $uploadedFiles[$key][$i] = $value;
108 108
                             break;
109 109
                         }
110 110
 
111
-                        $uploadedFiles[ $key ][ $i ][ 'name' ] = $value[ 'name' ][ $i ];
112
-                        $uploadedFiles[ $key ][ $i ][ 'type' ] = $value[ 'type' ][ $i ];
113
-                        $uploadedFiles[ $key ][ $i ][ 'tmp_name' ] = $value[ 'tmp_name' ][ $i ];
114
-                        $uploadedFiles[ $key ][ $i ][ 'error' ] = $value[ 'error' ][ $i ];
115
-                        $uploadedFiles[ $key ][ $i ][ 'size' ] = $value[ 'size' ][ $i ];
111
+                        $uploadedFiles[$key][$i]['name'] = $value['name'][$i];
112
+                        $uploadedFiles[$key][$i]['type'] = $value['type'][$i];
113
+                        $uploadedFiles[$key][$i]['tmp_name'] = $value['tmp_name'][$i];
114
+                        $uploadedFiles[$key][$i]['error'] = $value['error'][$i];
115
+                        $uploadedFiles[$key][$i]['size'] = $value['size'][$i];
116 116
                     }
117 117
                 } else {
118
-                    $uploadedFiles[ $key ][ 'name' ] = $value[ 'name' ];
119
-                    $uploadedFiles[ $key ][ 'type' ] = $value[ 'type' ];
120
-                    $uploadedFiles[ $key ][ 'tmp_name' ] = $value[ 'tmp_name' ];
121
-                    $uploadedFiles[ $key ][ 'error' ] = $value[ 'error' ];
122
-                    $uploadedFiles[ $key ][ 'size' ] = $value[ 'size' ];
118
+                    $uploadedFiles[$key]['name'] = $value['name'];
119
+                    $uploadedFiles[$key]['type'] = $value['type'];
120
+                    $uploadedFiles[$key]['tmp_name'] = $value['tmp_name'];
121
+                    $uploadedFiles[$key]['error'] = $value['error'];
122
+                    $uploadedFiles[$key]['size'] = $value['size'];
123 123
                 }
124 124
             }
125 125
         }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $message = clone $this;
192 192
 
193 193
         foreach ($cookies as $key => $value) {
194
-            $message->cookieParams[ $key ] = $value;
194
+            $message->cookieParams[$key] = $value;
195 195
         }
196 196
 
197 197
         return $message;
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $response = [];
277 277
         foreach ($this->uploadedFiles as $key => $uploadedFile) {
278
-            if (empty($uploadedFile[ 'name' ])) {
278
+            if (empty($uploadedFile['name'])) {
279 279
                 continue;
280 280
             } elseif (is_numeric(key($uploadedFile))) {
281 281
                 foreach ($uploadedFile as $index => $file) {
282
-                    $response[ $key ][ $index ] = new UploadFile($file);
282
+                    $response[$key][$index] = new UploadFile($file);
283 283
                 }
284 284
             } else {
285
-                $response[ $key ] = new UploadFile($uploadedFile);
285
+                $response[$key] = new UploadFile($uploadedFile);
286 286
             }
287 287
         }
288 288
 
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function getParsedBody()
344 344
     {
345
-        if (isset($this->headers[ 'Content-Type' ])) {
345
+        if (isset($this->headers['Content-Type'])) {
346 346
             if (in_array(
347
-                strtolower($this->headers[ 'Content-Type' ]),
347
+                strtolower($this->headers['Content-Type']),
348 348
                 [
349 349
                     'application/x-www-form-urlencoded',
350 350
                     'multipart/form-data',
@@ -449,10 +449,10 @@  discard block
 block discarded – undo
449 449
         $name = str_replace('SERVER_', '', $name);
450 450
         $name = strtoupper($name);
451 451
 
452
-        if (isset($this->serverParams[ $name ])) {
453
-            return $this->serverParams[ $name ];
454
-        } elseif (isset($_SERVER[ $name ])) {
455
-            return $_SERVER[ $name ];
452
+        if (isset($this->serverParams[$name])) {
453
+            return $this->serverParams[$name];
454
+        } elseif (isset($_SERVER[$name])) {
455
+            return $_SERVER[$name];
456 456
         }
457 457
 
458 458
         return $default;
@@ -485,10 +485,10 @@  discard block
 block discarded – undo
485 485
         $name = strtoupper($name);
486 486
 
487 487
         $message = clone $this;
488
-        $message->serverParams[ $name ] = $value;
488
+        $message->serverParams[$name] = $value;
489 489
 
490
-        if (empty($_SERVER[ 'SERVER_' . $name ])) {
491
-            $_SERVER[ 'SERVER_' . $name ] = $value;
490
+        if (empty($_SERVER['SERVER_' . $name])) {
491
+            $_SERVER['SERVER_' . $name] = $value;
492 492
         }
493 493
 
494 494
         return $message;
@@ -521,8 +521,8 @@  discard block
 block discarded – undo
521 521
 
522 522
         $message = clone $this;
523 523
 
524
-        if (isset($this->serverParams[ $name ])) {
525
-            unset($this->serverParams[ $name ]);
524
+        if (isset($this->serverParams[$name])) {
525
+            unset($this->serverParams[$name]);
526 526
         }
527 527
 
528 528
         return $message;
Please login to merge, or discard this patch.
src/Http/Message/Uri.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
             $httpStringRequest = trim($httpStringRequest, '/');
165 165
             $parseUrl = parse_url($httpStringRequest);
166 166
 
167
-            $this->host = isset($parseUrl[ 'host' ]) ? $parseUrl[ 'host' ] : null;
167
+            $this->host = isset($parseUrl['host']) ? $parseUrl['host'] : null;
168 168
 
169
-            $this->scheme = isset($parseUrl[ 'scheme' ]) ? $parseUrl[ 'scheme' ] : (is_https() ? 'https' : 'http');
169
+            $this->scheme = isset($parseUrl['scheme']) ? $parseUrl['scheme'] : (is_https() ? 'https' : 'http');
170 170
 
171 171
             /**
172 172
              * Define Uri Port
@@ -175,33 +175,33 @@  discard block
 block discarded – undo
175 175
                 $this->port = 443;
176 176
             }
177 177
 
178
-            if (isset($parseUrl[ 'path' ])) {
179
-                $xRequest = explode('/', $parseUrl[ 'path' ]);
178
+            if (isset($parseUrl['path'])) {
179
+                $xRequest = explode('/', $parseUrl['path']);
180 180
                 $this->path = implode('/', array_slice($xRequest, 1));
181 181
             }
182 182
 
183 183
             if (strpos($this->path, '.php') !== false) {
184 184
                 $xPath = explode('.php', $this->path);
185
-                $xPath = explode('/', trim($xPath[ 0 ], '/'));
185
+                $xPath = explode('/', trim($xPath[0], '/'));
186 186
                 array_pop($xPath);
187 187
 
188 188
                 $this->path = empty($xPath) ? null : implode('/', $xPath);
189 189
             }
190 190
 
191
-            $this->query = isset($parseUrl[ 'query' ]) ? $parseUrl[ 'query' ] : null;
192
-            $this->username = isset($parseUrl[ 'user' ]) ? $parseUrl[ 'user' ] : null;
193
-            $this->password = isset($parseUrl[ 'pass' ]) ? $parseUrl[ 'pass' ] : null;
194
-            $this->port = isset($parseUrl[ 'port' ]) ? $parseUrl[ 'port' ] : 80;
195
-            $this->fragment = isset($parseUrl[ 'fragment' ]) ? $parseUrl[ 'fragment' ] : null;
191
+            $this->query = isset($parseUrl['query']) ? $parseUrl['query'] : null;
192
+            $this->username = isset($parseUrl['user']) ? $parseUrl['user'] : null;
193
+            $this->password = isset($parseUrl['pass']) ? $parseUrl['pass'] : null;
194
+            $this->port = isset($parseUrl['port']) ? $parseUrl['port'] : 80;
195
+            $this->fragment = isset($parseUrl['fragment']) ? $parseUrl['fragment'] : null;
196 196
         } else {
197 197
             $this->segments = new Segments();
198 198
 
199 199
             /**
200 200
              * Define Uri Host
201 201
              */
202
-            $this->host = isset($_SERVER[ 'HTTP_HOST' ])
203
-                ? str_replace('www.', '', $_SERVER[ 'HTTP_HOST' ])
204
-                : str_replace('www.', '', $_SERVER[ 'SERVER_NAME' ]);
202
+            $this->host = isset($_SERVER['HTTP_HOST'])
203
+                ? str_replace('www.', '', $_SERVER['HTTP_HOST'])
204
+                : str_replace('www.', '', $_SERVER['SERVER_NAME']);
205 205
 
206 206
             /**
207 207
              * Define Uri Scheme
@@ -211,25 +211,25 @@  discard block
 block discarded – undo
211 211
             /**
212 212
              * Define Uri Attribute
213 213
              */
214
-            if (strpos($_SERVER[ 'PHP_SELF' ], '/@') !== false) {
215
-                $xPhpSelf = explode('/@', $_SERVER[ 'PHP_SELF' ]);
214
+            if (strpos($_SERVER['PHP_SELF'], '/@') !== false) {
215
+                $xPhpSelf = explode('/@', $_SERVER['PHP_SELF']);
216 216
 
217
-                $this->attribute = '@' . $xPhpSelf[ 1 ];
217
+                $this->attribute = '@' . $xPhpSelf[1];
218 218
 
219 219
                 if (strpos($this->attribute, '/') !== false) {
220 220
                     $xAttribute = explode('/', $this->attribute);
221 221
 
222
-                    $this->attribute = $xAttribute[ 0 ];
222
+                    $this->attribute = $xAttribute[0];
223 223
                 }
224 224
             }
225 225
 
226 226
             /**
227 227
              * Define Uri User and Password
228 228
              */
229
-            if (preg_match("/[a-zA-Z0-9]+[@][a-zA-Z0-9]+/", $_SERVER[ 'PHP_SELF' ], $usernamePassword)) {
230
-                $xUsernamePassword = explode('@', $usernamePassword[ 0 ]);
231
-                $this->username = $xUsernamePassword[ 0 ];
232
-                $this->password = $xUsernamePassword[ 1 ];
229
+            if (preg_match("/[a-zA-Z0-9]+[@][a-zA-Z0-9]+/", $_SERVER['PHP_SELF'], $usernamePassword)) {
230
+                $xUsernamePassword = explode('@', $usernamePassword[0]);
231
+                $this->username = $xUsernamePassword[0];
232
+                $this->password = $xUsernamePassword[1];
233 233
             }
234 234
 
235 235
             /**
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
             /**
247 247
              * Define Uri Path
248 248
              */
249
-            $xPath = explode('.php', $_SERVER[ 'PHP_SELF' ]);
250
-            $xPath = explode('/', trim($xPath[ 0 ], '/'));
249
+            $xPath = explode('.php', $_SERVER['PHP_SELF']);
250
+            $xPath = explode('/', trim($xPath[0], '/'));
251 251
             array_pop($xPath);
252 252
 
253 253
             $this->path = empty($xPath) ? null : implode('/', $xPath) . '/';
254 254
 
255
-            $this->query = isset($_SERVER[ 'QUERY_STRING' ]) ? $_SERVER[ 'QUERY_STRING' ] : null;
255
+            $this->query = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
256 256
 
257 257
         }
258 258
 
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
             if ((($ordinalNumber % 100) >= 11) && (($ordinalNumber % 100) <= 13)) {
322 322
                 $ordinalKey = $ordinalNumber . 'th';
323 323
             } else {
324
-                $ordinalKey = $ordinalNumber . $ordinalEnds[ $ordinalNumber % 10 ];
324
+                $ordinalKey = $ordinalNumber . $ordinalEnds[$ordinalNumber % 10];
325 325
             }
326 326
 
327
-            $elements[ $ordinalKey ] = $subdomain;
327
+            $elements[$ordinalKey] = $subdomain;
328 328
 
329
-            unset($elements[ $key ]);
329
+            unset($elements[$key]);
330 330
         }
331 331
     }
332 332
 
@@ -624,8 +624,8 @@  discard block
 block discarded – undo
624 624
     {
625 625
         if ($level === 'AUTO') {
626 626
             return reset($this->subDomains);
627
-        } elseif (isset($this->subDomains[ $level ])) {
628
-            return $this->subDomains[ $level ];
627
+        } elseif (isset($this->subDomains[$level])) {
628
+            return $this->subDomains[$level];
629 629
         }
630 630
 
631 631
         return false;
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
         if ($uriPath !== '/' &&
1076 1076
             substr($uriPath, strlen($uriPath) - 1) !== '/' &&
1077 1077
             $this->suffix !== '' && $this->suffix !== '.' &&
1078
-            ($uriPath . '/' !== $_SERVER[ 'REQUEST_URI' ]) &&
1078
+            ($uriPath . '/' !== $_SERVER['REQUEST_URI']) &&
1079 1079
             pathinfo($uriPath, PATHINFO_EXTENSION) === '' &&
1080 1080
             strpos($uriPath, '#') === false &&
1081 1081
             empty($this->query)
Please login to merge, or discard this patch.
src/Http/Router/Addresses.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         $path = '/' . ltrim($path, '/');
143 143
         $translations = $this->getTranslations($domain);
144 144
 
145
-        if (isset($translations[ $path ])) {
146
-            return $translations[ $path ];
145
+        if (isset($translations[$path])) {
146
+            return $translations[$path];
147 147
         } elseif (count($translations)) {
148 148
             foreach ($translations as $translation => $action) {
149 149
                 if ($action->isValidUriString($path)) {
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
 
178 178
         $translations = [];
179 179
 
180
-        if (isset($this->translations[ $domain ])) {
181
-            $translations = $this->translations[ $domain ];
180
+        if (isset($this->translations[$domain])) {
181
+            $translations = $this->translations[$domain];
182 182
         } else {
183 183
             $domain = new Domain($domain);
184 184
             if (array_key_exists($domain->getString(), $this->translations)) {
185
-                $translations = $this->translations[ $domain->getString() ];
185
+                $translations = $this->translations[$domain->getString()];
186 186
             } else {
187 187
                 foreach ($this->translations as $domainRoute => $domainMap) {
188 188
                     if (preg_match('/[{][a-zA-Z0-9$_]+[}]/', $domainRoute)) {
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
                         if ($domain->getParentDomain() === $domainRoute->getParentDomain() AND
192 192
                             $domain->getTotalSubDomains() == $domainRoute->getTotalSubDomains()
193 193
                         ) {
194
-                            if (isset($domainMap[ $domainRoute->getSubDomain() ])) {
194
+                            if (isset($domainMap[$domainRoute->getSubDomain()])) {
195 195
                                 $translations = $domainMap;
196
-                                $address = $translations[ $domainRoute->getSubDomain() ]->setClosureParameters(
196
+                                $address = $translations[$domainRoute->getSubDomain()]->setClosureParameters(
197 197
                                     $domain->getSubDomains()
198 198
                                 );
199 199
 
200
-                                unset($translations[ $domainRoute->getSubDomain() ]);
200
+                                unset($translations[$domainRoute->getSubDomain()]);
201 201
 
202 202
                                 if (false !== ($closureParameters = $address->getClosure())) {
203 203
 
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
         } else {
260 260
 
261 261
             if (is_string($address)) {
262
-                $namespace = isset($this->attributes[ 'namespace' ])
263
-                    ? $this->attributes[ 'namespace' ]
262
+                $namespace = isset($this->attributes['namespace'])
263
+                    ? $this->attributes['namespace']
264 264
                     : null;
265 265
                 $controllerClassName = trim($namespace, '\\') . '\\' . $address;
266 266
 
@@ -269,17 +269,17 @@  discard block
 block discarded – undo
269 269
                 }
270 270
             }
271 271
 
272
-            $closure = function () use ($address) {
272
+            $closure = function() use ($address) {
273 273
                 return $address;
274 274
             };
275 275
         }
276 276
 
277
-        $domain = isset($this->attributes[ 'domain' ])
278
-            ? $this->attributes[ 'domain' ]
277
+        $domain = isset($this->attributes['domain'])
278
+            ? $this->attributes['domain']
279 279
             : null;
280 280
 
281
-        $prefix = isset($this->attributes[ 'prefix' ])
282
-            ? $this->attributes[ 'prefix' ]
281
+        $prefix = isset($this->attributes['prefix'])
282
+            ? $this->attributes['prefix']
283 283
             : null;
284 284
 
285 285
         if ( ! preg_match('/[{][a-zA-Z0-9$_]+[}]/', $path)) {
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
         $action = new DataStructures\Action($method, $path, $closure, $domain);
290 290
 
291
-        $this->translations[ $action->getDomain() ][ $action->getPath() ] = $action;
291
+        $this->translations[$action->getDomain()][$action->getPath()] = $action;
292 292
 
293 293
         return $this;
294 294
     }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             }
373 373
         }
374 374
 
375
-        $this->domains[ $domain ] = $address;
375
+        $this->domains[$domain] = $address;
376 376
     }
377 377
 
378 378
     // ------------------------------------------------------------------------
@@ -387,20 +387,20 @@  discard block
 block discarded – undo
387 387
     public function getDomain($domain = null)
388 388
     {
389 389
         $domain = is_null($domain)
390
-            ? isset($_SERVER[ 'HTTP_HOST' ])
391
-                ? $_SERVER[ 'HTTP_HOST' ]
392
-                : $_SERVER[ 'SERVER_NAME' ]
390
+            ? isset($_SERVER['HTTP_HOST'])
391
+                ? $_SERVER['HTTP_HOST']
392
+                : $_SERVER['SERVER_NAME']
393 393
             : $domain;
394 394
 
395 395
         if (array_key_exists($domain, $this->domains)) {
396
-            if (is_callable($this->domains[ $domain ])) {
397
-                return call_user_func($this->domains[ $domain ]);
396
+            if (is_callable($this->domains[$domain])) {
397
+                return call_user_func($this->domains[$domain]);
398 398
             }
399 399
 
400
-            return $this->domains[ $domain ];
401
-        } elseif (isset($this->domains[ '*' ]) and is_callable($this->domains[ '*' ])) {
400
+            return $this->domains[$domain];
401
+        } elseif (isset($this->domains['*']) and is_callable($this->domains['*'])) {
402 402
             // check wildcard domain closure
403
-            if (false !== ($address = call_user_func($this->domains[ '*' ], $domain))) {
403
+            if (false !== ($address = call_user_func($this->domains['*'], $domain))) {
404 404
                 return $address;
405 405
             }
406 406
         } elseif (count($this->domains)) {
Please login to merge, or discard this patch.
src/Http/Controller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
      */
48 48
     public function &__get($property)
49 49
     {
50
-        $get[ $property ] = false;
50
+        $get[$property] = false;
51 51
 
52 52
         if (services()->has($property)) {
53
-            $get[ $property ] = services()->get($property);
53
+            $get[$property] = services()->get($property);
54 54
         }
55 55
 
56
-        return $get[ $property ];
56
+        return $get[$property];
57 57
     }
58 58
 
59 59
     // ------------------------------------------------------------------------
Please login to merge, or discard this patch.