Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
46 | public function compile(): array |
||
47 | { |
||
48 | $routes = $this->routes->get(); |
||
49 | $routesLength = count($routes); |
||
50 | for ($i = 0; $i < $routesLength; $i++) { |
||
51 | $matches = []; |
||
52 | $match = preg_match($routes[$i], $this->activeRoute, $matches); |
||
53 | if ($match) { |
||
54 | array_shift($matches); |
||
55 | return $matches; |
||
56 | } |
||
57 | } |
||
58 | return []; |
||
59 | } |
||
61 |