@@ -143,10 +143,10 @@ |
||
143 | 143 | return $headers; |
144 | 144 | } |
145 | 145 | |
146 | - /** |
|
147 | - * This static method will create a new Request object, based on the |
|
148 | - * current PHP request. |
|
149 | - */ |
|
146 | + /** |
|
147 | + * This static method will create a new Request object, based on the |
|
148 | + * current PHP request. |
|
149 | + */ |
|
150 | 150 | public static function getRequest(): RequestBuilder |
151 | 151 | { |
152 | 152 | $serverArr = $_SERVER; |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public static function sendResponse(Response $response) : Response |
168 | 168 | { |
169 | - header('HTTP/'.$response->getHttpVersion().' '.$response->getStatus().' '.$response->getStatusText()); |
|
169 | + header('HTTP/' . $response->getHttpVersion() . ' ' . $response->getStatus() . ' ' . $response->getStatusText()); |
|
170 | 170 | foreach ($response->getHeaders() as $key => $value) { |
171 | 171 | foreach ($value as $k => $v) { |
172 | 172 | if (0 === $k) { |
173 | - header($key.': '.$v); |
|
173 | + header($key . ': ' . $v); |
|
174 | 174 | } else { |
175 | - header($key.': '.$v, false); |
|
175 | + header($key . ': ' . $v, false); |
|
176 | 176 | } |
177 | 177 | } |
178 | 178 | } |
@@ -225,13 +225,13 @@ discard block |
||
225 | 225 | // (fast)cgi does not usually do this, however. |
226 | 226 | case 'PHP_AUTH_USER': |
227 | 227 | if (isset($serverArray['PHP_AUTH_PW'])) { |
228 | - $headers['Authorization'] = 'Basic '.base64_encode($value.':'.$serverArray['PHP_AUTH_PW']); |
|
228 | + $headers['Authorization'] = 'Basic ' . base64_encode($value . ':' . $serverArray['PHP_AUTH_PW']); |
|
229 | 229 | } |
230 | 230 | break; |
231 | 231 | |
232 | 232 | // Similarly, mod_php may also screw around with digest auth. |
233 | 233 | case 'PHP_AUTH_DIGEST': |
234 | - $headers['Authorization'] = 'Digest '.$value; |
|
234 | + $headers['Authorization'] = 'Digest ' . $value; |
|
235 | 235 | break; |
236 | 236 | |
237 | 237 | // Apache may prefix the HTTP_AUTHORIZATION header with |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $r = new RequestBuilder($method, $url, $headers); |
281 | 281 | $r->setHttpVersion($httpVersion); |
282 | 282 | $r->setRawServerData($serverArray); |
283 | - $r->setAbsoluteUrl($protocol.'://'.$hostName.$url); |
|
283 | + $r->setAbsoluteUrl($protocol . '://' . $hostName . $url); |
|
284 | 284 | |
285 | 285 | return $r; |
286 | 286 | } |