@@ -76,7 +76,7 @@ |
||
76 | 76 | $router = new Router(); |
77 | 77 | |
78 | 78 | foreach ($routes as $route) { |
79 | - $router->map($route['methods'], $route['pattern'], fn () => 'Hello') |
|
79 | + $router->map($route['methods'], $route['pattern'], fn() => 'Hello') |
|
80 | 80 | ->where($route['constraints']); |
81 | 81 | } |
82 | 82 |
@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | foreach ($routes as $route) { |
86 | 86 | foreach ($route['methods'] as $method) { |
87 | - $router->match([\strtolower($method)], $route['pattern'], fn () => ''); |
|
87 | + $router->match([\strtolower($method)], $route['pattern'], fn() => ''); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | foreach ($routes as $route) { |
75 | 75 | foreach ($route['methods'] as $method) { |
76 | - $router->map($method, $route['pattern'], fn () => 'Hello'); |
|
76 | + $router->map($method, $route['pattern'], fn() => 'Hello'); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | foreach ($routes as $route) { |
81 | 81 | foreach ($route['methods'] as $method) { |
82 | - $router->match($method, $route['pattern'], fn () => 'Hello'); |
|
82 | + $router->match($method, $route['pattern'], fn() => 'Hello'); |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | { |
68 | 68 | $orderedTasks = $this->tasks; |
69 | 69 | |
70 | - \usort($orderedTasks, function (Task $a, Task $b) { |
|
70 | + \usort($orderedTasks, function(Task $a, Task $b) { |
|
71 | 71 | return $a->duration() > $b->duration() ? 1 : -1; |
72 | 72 | }); |
73 | 73 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | */ |
79 | 79 | public function buildRoutes(array $routes): void |
80 | 80 | { |
81 | - $routes = function (RouteCollector $router) use ($routes): void { |
|
81 | + $routes = function(RouteCollector $router) use ($routes): void { |
|
82 | 82 | foreach ($routes as $route) { |
83 | 83 | foreach ($route['methods'] as $method) { |
84 | 84 | $router->addRoute($method, $route['pattern'], 'phpinfo'); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $router = new Router('/', new UriHandler(new UriFactory()), $container); |
87 | 87 | |
88 | 88 | foreach ($routes as $route) { |
89 | - $spRoute = new Route($route['pattern'], fn () => 'Hello World'); |
|
89 | + $spRoute = new Route($route['pattern'], fn() => 'Hello World'); |
|
90 | 90 | $spRoute->withVerbs(...$route['methods']); |
91 | 91 | |
92 | 92 | $router->setRoute($route['name'], $spRoute); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | foreach ($methods as $method) { |
85 | 85 | $path = ($this->strategy)($method, $host); |
86 | - $server = []; |
|
86 | + $server = []; |
|
87 | 87 | |
88 | 88 | if ($host !== '*') { |
89 | 89 | $server['HTTP_HOST'] = $host . 'laravel'; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | foreach ($routes as $route) { |
112 | 112 | $action = [ |
113 | - 'uses' => function ($id = 'Hello') { |
|
113 | + 'uses' => function($id = 'Hello') { |
|
114 | 114 | return $id; |
115 | 115 | }, |
116 | 116 | ]; |
@@ -108,7 +108,7 @@ |
||
108 | 108 | $collection = $routerContainer->getMap(); |
109 | 109 | |
110 | 110 | foreach ($routes as $route) { |
111 | - $auraRoute = $collection->route($route['name'], $route['pattern'], fn () => 'Hello'); |
|
111 | + $auraRoute = $collection->route($route['name'], $route['pattern'], fn() => 'Hello'); |
|
112 | 112 | |
113 | 113 | if ($route['host'] !== '*') { |
114 | 114 | $auraRoute->host($route['host']); |