| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 | string $method, | 
| 135 | 135 | string $requestedPath, | 
| 136 | 136 | string $folder = '', | 
| 137 | - ?string $cachedFile = null | |
| 137 | + ? string $cachedFile = null | |
| 138 | 138 |      ) { | 
| 139 | 139 |          if (!in_array($method, self::$validRequestMethods, true)) { | 
| 140 | 140 |              $message = sprintf('%s is not valid Http request method.', $method); | 
| @@ -177,8 +177,8 @@ discard block | ||
| 177 | 177 | $requestMethods, | 
| 178 | 178 | string $route, | 
| 179 | 179 | string $action, | 
| 180 | - ?string $returnType = null, | |
| 181 | - ?string $alias = null | |
| 180 | + ? string $returnType = null, | |
| 181 | + ? string $alias = null | |
| 182 | 182 | ) : void | 
| 183 | 183 |      { | 
| 184 | 184 | $requestMethodsGiven = is_array($requestMethods) ? (array) $requestMethods : [0 => $requestMethods]; | 
| @@ -216,7 +216,7 @@ discard block | ||
| 216 | 216 | * @param string|null $returnType | 
| 217 | 217 | * @return string | 
| 218 | 218 | */ | 
| 219 | - private function determineReturnType(?string $returnType) : string | |
| 219 | + private function determineReturnType(? string $returnType) : string | |
| 220 | 220 |      { | 
| 221 | 221 |          if ($returnType === null) { | 
| 222 | 222 | return $this->defaultReturnType; | 
| @@ -309,7 +309,7 @@ discard block | ||
| 309 | 309 | $this->cachedFile, | 
| 310 | 310 | '<?php return ' . var_export($dispatchData, true) . ';' | 
| 311 | 311 | ); | 
| 312 | - return new $options['dispatcher']($dispatchData ); | |
| 312 | + return new $options['dispatcher']($dispatchData); | |
| 313 | 313 | } | 
| 314 | 314 | |
| 315 | 315 | /** | 
| @@ -318,23 +318,23 @@ discard block | ||
| 318 | 318 | */ | 
| 319 | 319 | private function addRoutes(FastRoute\RouteCollector $route) : void | 
| 320 | 320 |      { | 
| 321 | - $routeIndex=0; | |
| 321 | + $routeIndex = 0; | |
| 322 | 322 |          foreach ($this->routes as $definedRoute) { | 
| 323 | 323 | $definedRoute[3] = $definedRoute[3] ?? $this->defaultReturnType; | 
| 324 | - $routeName = 'routeClosure'.$routeIndex; | |
| 324 | + $routeName = 'routeClosure' . $routeIndex; | |
| 325 | 325 | $route->addRoute(strtoupper($definedRoute[0]), $definedRoute[1], $routeName); | 
| 326 | 326 | $routeIndex++; | 
| 327 | 327 | } | 
| 328 | 328 | } | 
| 329 | 329 | private function setRouteClosures() : void | 
| 330 | 330 |      { | 
| 331 | - $routeIndex=0; | |
| 331 | + $routeIndex = 0; | |
| 332 | 332 |          foreach ($this->routes as $definedRoute) { | 
| 333 | 333 | $definedRoute[3] = $definedRoute[3] ?? $this->defaultReturnType; | 
| 334 | - $routeName = 'routeClosure'.$routeIndex; | |
| 334 | + $routeName = 'routeClosure' . $routeIndex; | |
| 335 | 335 | [$null1, $null2, $controller, $returnType] = $definedRoute; | 
| 336 | 336 | $returnType = Router::$translations[$returnType] ?? $this->defaultReturnType; | 
| 337 | -            $this->routerClosures[$routeName]= function($args) use ($controller, $returnType) { | |
| 337 | +            $this->routerClosures[$routeName] = function($args) use ($controller, $returnType) { | |
| 338 | 338 | return ['controller' => $controller, 'returnType'=> $returnType, 'args'=> $args]; | 
| 339 | 339 | }; | 
| 340 | 340 | $routeIndex++; |