@@ -114,13 +114,13 @@ |
||
114 | 114 | } |
115 | 115 | $controller = $this->resolveClass($middleware[0], $info['path'], $info['namespace']); |
116 | 116 | if (method_exists($controller, 'handle')) { |
117 | - $response = call_user_func_array([$controller, 'handle'], $params); |
|
118 | - if($response != false) { |
|
119 | - echo $response; |
|
120 | - exit; |
|
121 | - } else { |
|
122 | - return $response; |
|
123 | - } |
|
117 | + $response = call_user_func_array([$controller, 'handle'], $params); |
|
118 | + if($response != false) { |
|
119 | + echo $response; |
|
120 | + exit; |
|
121 | + } else { |
|
122 | + return $response; |
|
123 | + } |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | return $this->exception('handle() method is not found in <b>' . $command . '</b> class.'); |
@@ -114,8 +114,8 @@ |
||
114 | 114 | } |
115 | 115 | $controller = $this->resolveClass($middleware[0], $info['path'], $info['namespace']); |
116 | 116 | if (method_exists($controller, 'handle')) { |
117 | - $response = call_user_func_array([$controller, 'handle'], $params); |
|
118 | - if($response != false) { |
|
117 | + $response = call_user_func_array([$controller, 'handle'], $params); |
|
118 | + if ($response != false) { |
|
119 | 119 | echo $response; |
120 | 120 | exit; |
121 | 121 | } else { |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | { |
115 | 115 | if (!$this->absoluteUrl) { |
116 | 116 | // Guessing we're a http endpoint. |
117 | - $this->absoluteUrl = 'http://'. |
|
118 | - ($this->getHeader('Host') ?? 'localhost'). |
|
117 | + $this->absoluteUrl = 'http://' . |
|
118 | + ($this->getHeader('Host') ?? 'localhost') . |
|
119 | 119 | $this->getUrl(); |
120 | 120 | } |
121 | 121 | |
@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | return trim(substr($uri, strlen($baseUri)), '/'); |
178 | 178 | } |
179 | 179 | |
180 | - if ($uri.'/' === $baseUri) { |
|
180 | + if ($uri . '/' === $baseUri) { |
|
181 | 181 | return ''; |
182 | 182 | } |
183 | 183 | // A special case, if the baseUri was accessed without a trailing |
184 | 184 | // slash, we'll accept it as well. |
185 | 185 | |
186 | - throw new \LogicException('Requested uri ('.$this->getUrl().') is out of base uri ('.$this->getBaseUrl().')'); |
|
186 | + throw new \LogicException('Requested uri (' . $this->getUrl() . ') is out of base uri (' . $this->getBaseUrl() . ')'); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | /** |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function __toString(): string |
252 | 252 | { |
253 | - $out = $this->getMethod().' '.$this->getUrl().' HTTP/'.$this->getHttpVersion()."\r\n"; |
|
253 | + $out = $this->getMethod() . ' ' . $this->getUrl() . ' HTTP/' . $this->getHttpVersion() . "\r\n"; |
|
254 | 254 | |
255 | 255 | foreach ($this->getHeaders() as $key => $value) { |
256 | 256 | foreach ($value as $v) { |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | list($v) = explode(' ', $v, 2); |
259 | 259 | $v .= ' REDACTED'; |
260 | 260 | } |
261 | - $out .= $key.': '.$v."\r\n"; |
|
261 | + $out .= $key . ': ' . $v . "\r\n"; |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | $out .= "\r\n"; |