@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public static function middleware(array $stack): array |
46 | 46 | { |
47 | - return array_map(function ($callable) { |
|
47 | + return array_map(function($callable) { |
|
48 | 48 | $callable = is_string($callable) ? static::lazy($callable) : $callable; |
49 | 49 | return $callable; |
50 | 50 | }, $stack); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public static function lazy(string $className): callable |
61 | 61 | { |
62 | - return function (ServerRequestInterface $request, RequestHandlerInterface $handler) use ($className): ResponseInterface { |
|
62 | + return function(ServerRequestInterface $request, RequestHandlerInterface $handler) use ($className): ResponseInterface { |
|
63 | 63 | $class = new $className(); |
64 | 64 | if ($class instanceof MiddlewareInterface) { |
65 | 65 | return $class->process($request, $handler); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public static function router(ServerRequestInterface $request, string $path = null): ResponseInterface |
80 | 80 | { |
81 | 81 | $path = $path ?: __DIR__ . "/../app/routes.php"; |
82 | - $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($path) { |
|
82 | + $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) use ($path) { |
|
83 | 83 | include $path; |
84 | 84 | }); |
85 | 85 | $match = $dispatcher->dispatch($request->getMethod(), $request->getUri()->getPath()); |