@@ -129,7 +129,7 @@ |
||
| 129 | 129 | $nbHosts = $options['nbHosts']; |
| 130 | 130 | |
| 131 | 131 | for ($i = 1; $i <= $nbHosts; $i++) { |
| 132 | - $host = \sprintf( |
|
| 132 | + $host = \sprintf( |
|
| 133 | 133 | 'subdomain%s.domain.%s', |
| 134 | 134 | $i, |
| 135 | 135 | Text::insert($pattern, $constraints, ['before' => '{%', 'after' => '%}']) |
@@ -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 | |
@@ -72,10 +72,10 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | protected function buildRoutes(array $routes): Dispatcher |
| 74 | 74 | { |
| 75 | - $router = \FastRoute\simpleDispatcher(function (RouteCollector $router) use ($routes): void { |
|
| 75 | + $router = \FastRoute\simpleDispatcher(function(RouteCollector $router) use ($routes): void { |
|
| 76 | 76 | foreach ($routes as $route) { |
| 77 | 77 | foreach ($route['methods'] as $method) { |
| 78 | - $router->addRoute($method, $route['pattern'], fn () => 'Hello'); |
|
| 78 | + $router->addRoute($method, $route['pattern'], fn() => 'Hello'); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | }); |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | $pattern = $route['host'] . $pattern; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - $frRoute = new Route('_' . $route['name'], (array) $route['methods'], $pattern, fn () => 'Hello'); |
|
| 122 | + $frRoute = new Route('_' . $route['name'], (array) $route['methods'], $pattern, fn() => 'Hello'); |
|
| 123 | 123 | $frRoute->setPatterns($route['constraints']); |
| 124 | 124 | |
| 125 | 125 | $router->addRoute($frRoute); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | foreach ($this->generator->getMethods() as $method) { |
| 38 | 38 | [, $path] = $strategy($method); |
| 39 | - $request = new ServerRequest([], [], $path, $method); |
|
| 39 | + $request = new ServerRequest([], [], $path, $method); |
|
| 40 | 40 | |
| 41 | 41 | if (!$router->match($request) instanceof Route) { |
| 42 | 42 | return false; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | foreach ($this->generator->getMethods() as $method) { |
| 60 | 60 | [, $path] = $strategy($method); |
| 61 | - $request = new ServerRequest([], [], $path . 'aura_router', $method); |
|
| 61 | + $request = new ServerRequest([], [], $path . 'aura_router', $method); |
|
| 62 | 62 | |
| 63 | 63 | if (!$router->match($request) instanceof Route) { |
| 64 | 64 | return false; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $collection = $routerContainer->getMap(); |
| 111 | 111 | |
| 112 | 112 | foreach ($routes as $route) { |
| 113 | - $auraRoute = $collection->route($route['name'], $route['pattern'], fn () => 'Hello'); |
|
| 113 | + $auraRoute = $collection->route($route['name'], $route['pattern'], fn() => 'Hello'); |
|
| 114 | 114 | |
| 115 | 115 | if ($route['host'] !== '*') { |
| 116 | 116 | $auraRoute->host($route['host']); |
@@ -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 | |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | */ |
| 127 | 127 | protected function buildRoutes(array $routes): RouterInterface |
| 128 | 128 | { |
| 129 | - $resource = static function () use ($routes): RouteCollection { |
|
| 129 | + $resource = static function() use ($routes): RouteCollection { |
|
| 130 | 130 | $sfCollection = new RouteCollection(); |
| 131 | 131 | |
| 132 | 132 | foreach ($routes as $route) { |
@@ -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 | |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | |
| 116 | 116 | foreach ($routes as $route) { |
| 117 | 117 | $action = [ |
| 118 | - 'uses' => function ($id = 'Hello') { |
|
| 118 | + 'uses' => function($id = 'Hello') { |
|
| 119 | 119 | return $id; |
| 120 | 120 | }, |
| 121 | 121 | ]; |