Skip to content

Commit 7a8144b

Browse files
committed
style: break long lines
1 parent 3f0a198 commit 7a8144b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

system/HTTP/ResponseTrait.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,21 @@ public function redirect(string $uri, string $method = 'auto', ?int $code = null
509509
}
510510

511511
// IIS environment likely? Use 'refresh' for better compatibility
512-
if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) {
512+
if (
513+
$method === 'auto'
514+
&& isset($_SERVER['SERVER_SOFTWARE'])
515+
&& strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false
516+
) {
513517
$method = 'refresh';
514518
}
515519

516520
// override status code for HTTP/1.1 & higher
517521
// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
518-
if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $this->getProtocolVersion() >= 1.1 && $method !== 'refresh') {
522+
if (
523+
isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD'])
524+
&& $this->getProtocolVersion() >= 1.1
525+
&& $method !== 'refresh'
526+
) {
519527
$code = ($_SERVER['REQUEST_METHOD'] !== 'GET') ? 303 : ($code === 302 ? 307 : $code);
520528
}
521529

0 commit comments

Comments
 (0)