| @@ -42,7 +42,7 @@ | ||
| 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 |          $template = $request->getAttribute('template'); | 
| 48 | 48 |          $data = $request->getAttribute('data'); | 
| @@ -29,5 +29,5 @@ | ||
| 29 | 29 | * | 
| 30 | 30 | * @return ResponseInterface | 
| 31 | 31 | */ | 
| 32 | - public function __invoke(ServerRequestInterface &$request, ResponseInterface $response); | |
| 32 | + public function __invoke(ServerRequestInterface&$request, ResponseInterface $response); | |
| 33 | 33 | } | 
| @@ -42,7 +42,7 @@ | ||
| 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 |          $template = $request->getAttribute('template'); | 
| 48 | 48 |          $data = $request->getAttribute('data'); | 
| @@ -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']; | 
| @@ -247,7 +247,7 @@ discard block | ||
| 247 | 247 | |
| 248 | 248 | $this->subDomain = $subDomain; | 
| 249 | 249 | $this->mainDomain = $domain; | 
| 250 | - $this->applicationDomain = $this->subDomain.'.'. $this->mainDomain; | |
| 250 | + $this->applicationDomain = $this->subDomain.'.'.$this->mainDomain; | |
| 251 | 251 | |
| 252 | 252 | return $this; | 
| 253 | 253 | } | 
| @@ -280,7 +280,7 @@ discard block | ||
| 280 | 280 | || $this->checkDomainIsValid($applicationData['type'], $applicationData['path']) | 
| 281 | 281 |              ) { | 
| 282 | 282 | $this->selectedModule = $applicationData['module']; | 
| 283 | - $this->selectedApplication = (string)$applicationName; | |
| 283 | + $this->selectedApplication = (string) $applicationName; | |
| 284 | 284 | $this->selectedTheme = $applicationData['theme']; | 
| 285 | 285 | |
| 286 | 286 | $this->selectedApplicationUri = '/'.$subDirectory; | 
| @@ -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'); | 
| @@ -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 | |
| @@ -204,7 +204,7 @@ | ||
| 204 | 204 | * @param mixed $data | 
| 205 | 205 | * @param mixed $subject | 
| 206 | 206 | * | 
| 207 | - * @return bool | |
| 207 | + * @return integer | |
| 208 | 208 | */ | 
| 209 | 209 | private function checkWildcardMatch($data, $subject) | 
| 210 | 210 |      { | 
| @@ -238,7 +238,7 @@ | ||
| 238 | 238 | */ | 
| 239 | 239 | private function checkInArrayMatch($data, $subject) | 
| 240 | 240 |      { | 
| 241 | - return in_array($data, (array)$subject); | |
| 241 | + return in_array($data, (array) $subject); | |
| 242 | 242 | } | 
| 243 | 243 | |
| 244 | 244 | /** | 
| @@ -255,8 +255,8 @@ | ||
| 255 | 255 | $normalizedName = $this->getNormalizedName($serviceClass, $parameterName); | 
| 256 | 256 | |
| 257 | 257 | // If the parameter marked as to be used as a scalar | 
| 258 | -        if (is_scalar($parameter) && strpos((string)$parameter, '!:') === 0) { | |
| 259 | - $parameter = substr((string)$parameter, 2); | |
| 258 | +        if (is_scalar($parameter) && strpos((string) $parameter, '!:') === 0) { | |
| 259 | + $parameter = substr((string) $parameter, 2); | |
| 260 | 260 |          } else { | 
| 261 | 261 | // Otherwise check if the parameter is a service. | 
| 262 | 262 | $parameter = $this->getReferenceServiceIfAvailable($parameter); | 
| @@ -222,7 +222,7 @@ discard block | ||
| 222 | 222 | /** | 
| 223 | 223 | * Creates a safe normalized name. | 
| 224 | 224 | * | 
| 225 | - * @param $className | |
| 225 | + * @param string|null $className | |
| 226 | 226 | * @param $argumentName | 
| 227 | 227 | * | 
| 228 | 228 | * @return string | 
| @@ -290,7 +290,7 @@ discard block | ||
| 290 | 290 | /** | 
| 291 | 291 | * Sets service argument. | 
| 292 | 292 | * | 
| 293 | - * @param string|Definition $service | |
| 293 | + * @param Definition $service | |
| 294 | 294 | * @param mixed $parameter | 
| 295 | 295 | * | 
| 296 | 296 | * @throws RuntimeException | 
| @@ -356,7 +356,7 @@ discard block | ||
| 356 | 356 | /** | 
| 357 | 357 | * Checks whether the service is shared and initialized | 
| 358 | 358 | * | 
| 359 | - * @param $serviceClass | |
| 359 | + * @param string|null $serviceClass | |
| 360 | 360 | * @throws RuntimeException | 
| 361 | 361 | */ | 
| 362 | 362 | private function checkSharedServiceClassState($serviceClass) | 
| @@ -50,7 +50,7 @@ | ||
| 50 | 50 | * | 
| 51 | 51 | * @return ResponseInterface | 
| 52 | 52 | */ | 
| 53 | - final public function __invoke(ServerRequestInterface &$request, ResponseInterface $response) | |
| 53 | + final public function __invoke(ServerRequestInterface&$request, ResponseInterface $response) | |
| 54 | 54 |      { | 
| 55 | 55 | $this->request = $request; | 
| 56 | 56 | $this->response = $response; |