@@ -24,7 +24,6 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Returns a response with a particular view loaded. |
26 | 26 | * |
27 | - * @param string $view name of the view to load |
|
28 | 27 | * @param array $data data to expose to the view |
29 | 28 | * @return \Psr\Http\Message\ResponseInterface |
30 | 29 | */ |
@@ -36,7 +35,7 @@ discard block |
||
36 | 35 | /** |
37 | 36 | * Create a new basic string response. |
38 | 37 | * |
39 | - * @param string $name name of the view to load |
|
38 | + * @param string $string |
|
40 | 39 | * @return \Psr\Http\Message\ResponseInterface |
41 | 40 | */ |
42 | 41 | public static function string($string) |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public static function middleware(array $stack) |
44 | 44 | { |
45 | - return array_map(function ($callable) { |
|
45 | + return array_map(function($callable) { |
|
46 | 46 | $callable = is_string($callable) ? static::lazy($callable) : $callable; |
47 | 47 | return $callable; |
48 | 48 | }, $stack); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public static function lazy($className) |
59 | 59 | { |
60 | - return function (ServerRequestInterface $request, $next) use ($className) { |
|
60 | + return function(ServerRequestInterface $request, $next) use ($className) { |
|
61 | 61 | $class = new $className(); |
62 | 62 | if ($class instanceof MiddlewareInterface) { |
63 | 63 | return $class->process($request, $next); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public static function router(ServerRequestInterface $request, $path = null) |
76 | 76 | { |
77 | 77 | $path = $path ?: __DIR__ . "/../app/routes.php"; |
78 | - $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($path) { |
|
78 | + $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) use ($path) { |
|
79 | 79 | include $path; |
80 | 80 | }); |
81 | 81 | $match = $dispatcher->dispatch($request->getMethod(), $request->getUri()->getPath()); |