@@ -27,9 +27,9 @@ |
||
| 27 | 27 | ->getMock(); |
| 28 | 28 | |
| 29 | 29 | $this->router |
| 30 | - ->expects($this->once()) |
|
| 31 | - ->method('route') |
|
| 32 | - ->willReturn(['controller' => 'Default', 'action' => 'notFound', 'params' => []]); |
|
| 30 | + ->expects($this->once()) |
|
| 31 | + ->method('route') |
|
| 32 | + ->willReturn(['controller' => 'Default', 'action' => 'notFound', 'params' => []]); |
|
| 33 | 33 | |
| 34 | 34 | $this->app = new Application($this->router); |
| 35 | 35 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $regex = $this->createRegex($route); |
| 32 | 32 | |
| 33 | 33 | if (preg_match('#^'.$regex.'$#', $path, $matches)) { |
| 34 | - $params = array_filter($matches, function ($key) { |
|
| 34 | + $params = array_filter($matches, function($key) { |
|
| 35 | 35 | return !\is_int($key); |
| 36 | 36 | }, ARRAY_FILTER_USE_KEY); |
| 37 | 37 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $reqs = $route->getRequirements(); |
| 51 | 51 | $regex = preg_replace_callback( |
| 52 | 52 | '/{(\w+)}/', |
| 53 | - function ($matches) use ($reqs) { |
|
| 53 | + function($matches) use ($reqs) { |
|
| 54 | 54 | $req = $reqs[$matches[1]] ?? '.+'; |
| 55 | 55 | |
| 56 | 56 | return "(?<{$matches[1]}>{$req})"; |