@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $target = '/'; |
52 | 52 | if ($this->uri->getPath() !== null) { |
53 | 53 | $target = $this->uri->getPath(); |
54 | - $target .= (!empty($this->uri->getQuery())) ? '?'.$this->uri->getQuery() : ''; |
|
54 | + $target .= (!empty($this->uri->getQuery())) ? '?' . $this->uri->getQuery() : ''; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $this->requestTarget = $target; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function withUri(UriInterface $uri, $preserveHost = false) |
178 | 178 | { |
179 | - $clone = clone $this; |
|
179 | + $clone = clone $this; |
|
180 | 180 | $clone->uri = $uri; |
181 | 181 | |
182 | 182 | if (!$preserveHost) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @var integer |
42 | 42 | */ |
43 | - const HTTP_PORT = 80; |
|
43 | + const HTTP_PORT = 80; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Https port |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $port = $this->getPort(); |
199 | 199 | $userInfo = $this->getUserInfo(); |
200 | 200 | |
201 | - return ($userInfo ? $userInfo. '@' : '').$this->getHost().($port ? ':' . $port : ''); |
|
201 | + return ($userInfo ? $userInfo . '@' : '') . $this->getHost() . ($port ? ':' . $port : ''); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | if (!empty($this->user)) { |
221 | 221 | $userInfo = $this->user; |
222 | 222 | if (!empty($this->password)) { |
223 | - $userInfo .= ':'.$this->password; |
|
223 | + $userInfo .= ':' . $this->password; |
|
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $this->validatePath($path); |
471 | 471 | |
472 | 472 | $clone = clone $this; |
473 | - $clone->path = $this->urlEncode((string)$path); |
|
473 | + $clone->path = $this->urlEncode((string) $path); |
|
474 | 474 | |
475 | 475 | return $clone; |
476 | 476 | } |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $this->validateQuery($query); |
498 | 498 | |
499 | 499 | $clone = clone $this; |
500 | - $clone->query = $this->urlEncode((string)$query); |
|
500 | + $clone->query = $this->urlEncode((string) $query); |
|
501 | 501 | |
502 | 502 | return $clone; |
503 | 503 | } |
@@ -566,8 +566,8 @@ discard block |
||
566 | 566 | |
567 | 567 | $path = '/' . ltrim($path, '/'); |
568 | 568 | |
569 | - return ($scheme ? $scheme.':' : '').($authority ? '//'.$authority : '') |
|
570 | - .$path.($query ? '?' . $query : '').($fragment ? '#' . $fragment : ''); |
|
569 | + return ($scheme ? $scheme . ':' : '') . ($authority ? '//' . $authority : '') |
|
570 | + .$path . ($query ? '?' . $query : '') . ($fragment ? '#' . $fragment : ''); |
|
571 | 571 | } |
572 | 572 | |
573 | 573 | // ------------ PRIVATE METHODS |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | throw new InvalidArgumentException('Uri scheme must be a string'); |
600 | 600 | } |
601 | 601 | |
602 | - $scheme = str_replace('://', '', strtolower((string)$scheme)); |
|
602 | + $scheme = str_replace('://', '', strtolower((string) $scheme)); |
|
603 | 603 | if (!isset($this->validSchema[$scheme])) { |
604 | 604 | throw new InvalidArgumentException('Uri scheme must be one of: "", "https", "http"'); |
605 | 605 | } |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | { |
703 | 703 | return preg_replace_callback( |
704 | 704 | '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', |
705 | - function ($match) { |
|
705 | + function($match) { |
|
706 | 706 | return rawurlencode($match[0]); |
707 | 707 | }, |
708 | 708 | $path |