| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class RouteCollection |
||
| 8 | { |
||
| 9 | /** @var array<string, Route> */ |
||
| 10 | private array $routes = []; |
||
| 11 | |||
| 12 | 5 | public function get(string $route_path): ?Route |
|
| 13 | { |
||
| 14 | 5 | return $this->routes[$route_path] ?? null; |
|
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @return array<string, Route> |
||
| 19 | */ |
||
| 20 | 1 | public function all(): array |
|
| 23 | } |
||
| 24 | |||
| 25 | 4 | public function add(Route $route): self |
|
| 30 | } |
||
| 31 | } |
||
| 32 |