@@ -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})"; |
@@ -32,9 +32,9 @@ |
||
32 | 32 | ->getMock(); |
33 | 33 | |
34 | 34 | $this->router |
35 | - ->expects($this->once()) |
|
36 | - ->method('route') |
|
37 | - ->willReturn(['controller' => 'DefaultController', 'action' => 'notFoundAction', 'params' => []]); |
|
35 | + ->expects($this->once()) |
|
36 | + ->method('route') |
|
37 | + ->willReturn(['controller' => 'DefaultController', 'action' => 'notFoundAction', 'params' => []]); |
|
38 | 38 | |
39 | 39 | $this->app = new Application($this->router); |
40 | 40 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | public static function createFromGlobals(): RequestInterface |
46 | 46 | { |
47 | 47 | foreach ([$_GET, $_POST, $_COOKIE] as &$array) { |
48 | - array_walk($array, function ($value) { |
|
48 | + array_walk($array, function($value) { |
|
49 | 49 | htmlspecialchars($value); |
50 | 50 | }); |
51 | 51 | } |