| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 13 | class RouteParamsRegistry |
||
| 14 | { |
||
| 15 | public const CONTROLLER_KEY = '_controller'; |
||
| 16 | |||
| 17 | public const ROUTE_KEY = '_route'; |
||
| 18 | |||
| 19 | private $routeParams; |
||
| 20 | |||
| 21 | 3 | public function getRouteParams(): array |
|
| 22 | { |
||
| 23 | 3 | if (!isset($this->routeParams)) { |
|
| 24 | throw new \LogicException('Route params have not been set'); |
||
| 25 | } |
||
| 26 | |||
| 27 | 3 | return $this->routeParams; |
|
| 28 | } |
||
| 29 | |||
| 30 | 3 | public function setRouteParams(array $routeParams): void |
|
| 33 | 3 | } |
|
| 34 | |||
| 35 | 2 | public function getParameter(string $key): string |
|
| 42 | } |
||
| 43 | } |
||
| 44 |