@@ -251,7 +251,10 @@ protected function parseRequestURI(): string
251251 $ uri = $ parts ['path ' ] ?? '' ;
252252
253253 // Strip the SCRIPT_NAME path from the URI
254- if ($ uri !== '' && isset ($ _SERVER ['SCRIPT_NAME ' ][0 ]) && pathinfo ($ _SERVER ['SCRIPT_NAME ' ], PATHINFO_EXTENSION ) === 'php ' ) {
254+ if (
255+ $ uri !== '' && isset ($ _SERVER ['SCRIPT_NAME ' ][0 ])
256+ && pathinfo ($ _SERVER ['SCRIPT_NAME ' ], PATHINFO_EXTENSION ) === 'php '
257+ ) {
255258 // Compare each segment, dropping them until there is no match
256259 $ segments = $ keep = explode ('/ ' , $ uri );
257260
@@ -356,7 +359,8 @@ public function isCLI(): bool
356359 */
357360 public function isAJAX (): bool
358361 {
359- return $ this ->hasHeader ('X-Requested-With ' ) && strtolower ($ this ->header ('X-Requested-With ' )->getValue ()) === 'xmlhttprequest ' ;
362+ return $ this ->hasHeader ('X-Requested-With ' )
363+ && strtolower ($ this ->header ('X-Requested-With ' )->getValue ()) === 'xmlhttprequest ' ;
360364 }
361365
362366 /**
@@ -512,7 +516,10 @@ public function getDefaultLocale(): string
512516 */
513517 public function getVar ($ index = null , $ filter = null , $ flags = null )
514518 {
515- if (strpos ($ this ->getHeaderLine ('Content-Type ' ), 'application/json ' ) !== false && $ this ->body !== null ) {
519+ if (
520+ strpos ($ this ->getHeaderLine ('Content-Type ' ), 'application/json ' ) !== false
521+ && $ this ->body !== null
522+ ) {
516523 if ($ index === null ) {
517524 return $ this ->getJSON ();
518525 }
@@ -649,7 +656,9 @@ public function getPostGet($index = null, $filter = null, $flags = null)
649656 // Use $_POST directly here, since filter_has_var only
650657 // checks the initial POST data, not anything that might
651658 // have been added since.
652- return isset ($ _POST [$ index ]) ? $ this ->getPost ($ index , $ filter , $ flags ) : (isset ($ _GET [$ index ]) ? $ this ->getGet ($ index , $ filter , $ flags ) : $ this ->getPost ($ index , $ filter , $ flags ));
659+ return isset ($ _POST [$ index ])
660+ ? $ this ->getPost ($ index , $ filter , $ flags )
661+ : (isset ($ _GET [$ index ]) ? $ this ->getGet ($ index , $ filter , $ flags ) : $ this ->getPost ($ index , $ filter , $ flags ));
653662 }
654663
655664 /**
@@ -669,7 +678,9 @@ public function getGetPost($index = null, $filter = null, $flags = null)
669678 // Use $_GET directly here, since filter_has_var only
670679 // checks the initial GET data, not anything that might
671680 // have been added since.
672- return isset ($ _GET [$ index ]) ? $ this ->getGet ($ index , $ filter , $ flags ) : (isset ($ _POST [$ index ]) ? $ this ->getPost ($ index , $ filter , $ flags ) : $ this ->getGet ($ index , $ filter , $ flags ));
681+ return isset ($ _GET [$ index ])
682+ ? $ this ->getGet ($ index , $ filter , $ flags )
683+ : (isset ($ _POST [$ index ]) ? $ this ->getPost ($ index , $ filter , $ flags ) : $ this ->getGet ($ index , $ filter , $ flags ));
673684 }
674685
675686 /**
0 commit comments