| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class RouteCollection |
||
| 15 | { |
||
| 16 | /** @var array<string, Route> */ |
||
| 17 | private array $routes = []; |
||
| 18 | |||
| 19 | public function get(string $route_path): ?Route |
||
| 20 | { |
||
| 21 | return $this->routes[$route_path] ?? null; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array<string, Route> |
||
| 26 | */ |
||
| 27 | public function all(): array |
||
| 30 | } |
||
| 31 | |||
| 32 | public function add(Route $route): self |
||
| 37 | } |
||
| 38 | } |
||
| 39 |