@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function isAjax() |
188 | 188 | { |
189 | - return 'XMLHttpRequest' === Arrays::first((array) I::get($this->getHeaders(), 'x-requested-with', [])); |
|
189 | + return 'XMLHttpRequest' === Arrays::first((array)I::get($this->getHeaders(), 'x-requested-with', [])); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $secure = $this->isSecureConnection(); |
382 | 382 | $http = $secure ? 'https' : 'http'; |
383 | 383 | if (I::get($this->getHeaders(), 'x-forwarded-host')) { |
384 | - $this->__hostInfo = $http . '://' . trim((string) Arrays::first(explode(',', (string) Arrays::first((array) I::get($this->getHeaders(), 'x-forward-host', []))))); |
|
384 | + $this->__hostInfo = $http . '://' . trim((string)Arrays::first(explode(',', (string)Arrays::first((array)I::get($this->getHeaders(), 'x-forward-host', []))))); |
|
385 | 385 | } elseif (I::get($this->getHeaders(), 'host')) { |
386 | 386 | $this->__hostInfo = $http . '://' . Arrays::first(I::get($this->getHeaders(), 'host')); |
387 | 387 | } elseif (isset($_SERVER['SERVER_NAME'])) { |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | */ |
465 | 465 | public function getQueryString() |
466 | 466 | { |
467 | - return (string) I::get($_SERVER, 'QUERY_STRING', ''); |
|
467 | + return (string)I::get($_SERVER, 'QUERY_STRING', ''); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | /** |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | return true; |
479 | 479 | } |
480 | 480 | foreach ($this->__secureProtocolHeaders as $header => $values) { |
481 | - if (($headerValue = (string) I::get($this->getHeaders(), $header)) !== null) { |
|
481 | + if (($headerValue = (string)I::get($this->getHeaders(), $header)) !== null) { |
|
482 | 482 | foreach ($values as $value) { |
483 | 483 | if (strcasecmp($headerValue, $value) === 0) { |
484 | 484 | return true; |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | */ |
498 | 498 | public function getServerName() |
499 | 499 | { |
500 | - return (string) I::get($_SERVER, 'SERVER_NAME'); |
|
500 | + return (string)I::get($_SERVER, 'SERVER_NAME'); |
|
501 | 501 | } |
502 | 502 | |
503 | 503 | /** |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | */ |
508 | 508 | public function getServerPort() |
509 | 509 | { |
510 | - return (int) I::get($_SERVER, 'SERVER_PORT'); |
|
510 | + return (int)I::get($_SERVER, 'SERVER_PORT'); |
|
511 | 511 | } |
512 | 512 | |
513 | 513 | /** |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | */ |
563 | 563 | public function getRemoteIP() |
564 | 564 | { |
565 | - return (string) I::get($_SERVER, 'REMOTE_ADDR'); |
|
565 | + return (string)I::get($_SERVER, 'REMOTE_ADDR'); |
|
566 | 566 | } |
567 | 567 | |
568 | 568 | /** |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | */ |
573 | 573 | public function getRemoteHost() |
574 | 574 | { |
575 | - return (string) I::get($_SERVER, 'REMOTE_HOST'); |
|
575 | + return (string)I::get($_SERVER, 'REMOTE_HOST'); |
|
576 | 576 | } |
577 | 577 | |
578 | 578 | /** |