@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function format() |
| 35 | 35 | { |
| 36 | 36 | if ($this->format !== null) { |
| 37 | - return $this->format; |
|
| 37 | + return $this->format; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | if ($this->method() !== 'CONNECT' && $this->method !== 'OPTIONS') { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function path() |
| 64 | 64 | { |
| 65 | 65 | if ($this->path !== null) { |
| 66 | - return $this->path; |
|
| 66 | + return $this->path; |
|
| 67 | 67 | } |
| 68 | 68 | if (!empty($_SERVER['HTTP_X_ORIGINAL_URL'])) { |
| 69 | 69 | // IIS with Microsoft Rewrite Module |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | public function query($key = null, $default = null) |
| 114 | 114 | { |
| 115 | 115 | if ($this->query === null) { |
| 116 | - $this->query = $_GET; |
|
| 116 | + $this->query = $_GET; |
|
| 117 | 117 | } |
| 118 | 118 | if ($key === null) { |
| 119 | - return $this->query; |
|
| 119 | + return $this->query; |
|
| 120 | 120 | } |
| 121 | 121 | return array_key_exists($key, $this->query) ? $this->query[$key] : $default; |
| 122 | 122 | } |
@@ -70,8 +70,12 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function cookie($key = null, $default = null) |
| 72 | 72 | { |
| 73 | - if ($this->cookie === null) return $this->cookie = $_COOKIE; |
|
| 74 | - if ($key === null) return $this->cookie; |
|
| 73 | + if ($this->cookie === null) { |
|
| 74 | + return $this->cookie = $_COOKIE; |
|
| 75 | + } |
|
| 76 | + if ($key === null) { |
|
| 77 | + return $this->cookie; |
|
| 78 | + } |
|
| 75 | 79 | return isset($this->cookie[$key]) ? $this->cookie[$key] : $default; |
| 76 | 80 | } |
| 77 | 81 | |