@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing; |
4 | 4 | |
5 | 5 | class Matcher |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct(RouteService $routeService) |
13 | 13 | { |
14 | 14 | $this->routeService = $routeService; |
15 | - $this->routeNotFound = new Route('', function(){ |
|
15 | + $this->routeNotFound = new Route('', function() { |
|
16 | 16 | return null; |
17 | 17 | }); |
18 | 18 | } |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | yield $this->routeNotFound; |
36 | 36 | } |
37 | 37 | |
38 | - protected function matchRule(Route $route, string $pathUrl) : ?Route |
|
38 | + protected function matchRule(Route $route, string $pathUrl) : ? Route |
|
39 | 39 | { |
40 | 40 | $activeRoute = null; |
41 | 41 | |
42 | 42 | $regexp = $this->routeService->makeRegExp($route); |
43 | 43 | |
44 | - if (preg_match('~^' . $regexp . '$~Uiu', $pathUrl, $values)) { |
|
44 | + if (preg_match('~^'.$regexp.'$~Uiu', $pathUrl, $values)) { |
|
45 | 45 | $filterValues = array_filter(array_keys($values), 'is_string'); |
46 | 46 | $matches = array_intersect_key($values, array_flip($filterValues)); |
47 | 47 | $activeRoute = $route->setMatches($matches); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing; |
4 | 4 | |
5 | 5 | class RouteService |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing\Traits; |
4 | 4 | |
5 | 5 | use Psr\Http\Message\RequestInterface; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing; |
4 | 4 | |
5 | 5 | class EndPoint |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing; |
4 | 4 | |
5 | 5 | use Psr\Http\Message\RequestInterface; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | namespace PTS\Routing; |
4 | 4 | |
5 | 5 | use PTS\Tools\Collection; |