@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @return ResponseInterface |
44 | 44 | */ |
45 | - public function __invoke(ServerRequestInterface &$request, ResponseInterface $response) |
|
45 | + public function __invoke(ServerRequestInterface&$request, ResponseInterface $response) |
|
46 | 46 | { |
47 | 47 | if (headers_sent()) { |
48 | 48 | throw new RuntimeException('Unable to emit response; headers already sent'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | // Handle errors here. |
54 | 54 | if ($response->getStatusCode() !== 200) { |
55 | - $errorTemplate = 'error-' . $response->getStatusCode(); |
|
55 | + $errorTemplate = 'error-'.$response->getStatusCode(); |
|
56 | 56 | $error = $request->getAttribute('exception'); |
57 | 57 | $content = $this->templateRenderer->render($errorTemplate, ['exception' => $error]); |
58 | 58 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'HTTP/%s %d%s', |
65 | 65 | $response->getProtocolVersion(), |
66 | 66 | $response->getStatusCode(), |
67 | - ($reasonPhrase ? ' ' . $reasonPhrase : '') |
|
67 | + ($reasonPhrase ? ' '.$reasonPhrase : '') |
|
68 | 68 | )); |
69 | 69 | |
70 | 70 | foreach ($response->getHeaders() as $headerName => $values) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | private function injectContentLength(ResponseInterface $response) |
91 | 91 | { |
92 | - if (!$response->hasHeader('Content-Length')&& !is_null($response->getBody()->getSize())) { |
|
92 | + if (!$response->hasHeader('Content-Length') && !is_null($response->getBody()->getSize())) { |
|
93 | 93 | $response = $response->withHeader('Content-Length', (string) $response->getBody()->getSize()); |
94 | 94 | } |
95 | 95 |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | ini_set('session.cookie_httponly', '1'); |
208 | 208 | |
209 | 209 | // hide session name |
210 | - session_name(self::COOKIE_SESSION_PREFIX . '-' . bin2hex(self::SESSION_SALT)); |
|
210 | + session_name(self::COOKIE_SESSION_PREFIX.'-'.bin2hex(self::SESSION_SALT)); |
|
211 | 211 | // set session lifetime to 1 hour |
212 | 212 | session_set_cookie_params(3600); |
213 | 213 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | |
242 | 242 | $this->subDomain = $subDomain; |
243 | 243 | $this->mainDomain = $domain; |
244 | - $this->applicationDomain = $this->subDomain.'.'. $this->mainDomain; |
|
244 | + $this->applicationDomain = $this->subDomain.'.'.$this->mainDomain; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $routes = $this->config->toArray(); |
49 | 49 | |
50 | 50 | $this->adapter = \FastRoute\simpleDispatcher( |
51 | - function (RouteCollector $routeCollector) use ($routes) { |
|
51 | + function(RouteCollector $routeCollector) use ($routes) { |
|
52 | 52 | foreach ($routes as $route) { |
53 | 53 | $method = $route['allowed_methods']; |
54 | 54 | $uri = $route['path']; |