@@ -40,7 +40,7 @@ |
||
40 | 40 | $reqs = $route->getRequirements(); |
41 | 41 | preg_replace_callback( |
42 | 42 | '/{(\w+)}/', |
43 | - function ($matches) use ($reqs) { |
|
43 | + function($matches) use ($reqs) { |
|
44 | 44 | $req = $reqs[$matches[1]] ?? '.+'; |
45 | 45 | return "(?<{$matches[1]}>{$req})"; |
46 | 46 | }, |
@@ -23,9 +23,9 @@ |
||
23 | 23 | $controller = $attributes['controller'].'Controller'; |
24 | 24 | $action = $attributes['action'].'Action'; |
25 | 25 | |
26 | - $namespace = '\\App\\Controller\\'; |
|
26 | + $namespace = '\\App\\Controller\\'; |
|
27 | 27 | if (!class_exists($namespace.$controller)) { |
28 | - $namespace = '\\App\\Lib\\Controller\\'; |
|
28 | + $namespace = '\\App\\Lib\\Controller\\'; |
|
29 | 29 | } |
30 | 30 | $response = ($namespace.$controller)::create()->$action($request, ...$attributes['params']); |
31 | 31 |
@@ -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 | } |