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 ( 32bcbb...d223c5 )
by
unknown
02:51
created
src/Http/Input.php 1 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.