Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
15 | 11 | public function addRoute(string $routeName, $routeData): void |
|
16 | { |
||
17 | 11 | if (isset($this->routes[$routeName])) { |
|
18 | 1 | throw new BadRouteException(sprintf( |
|
19 | 1 | 'Cannot register two routes with same name "%s"', |
|
20 | 1 | $routeName |
|
21 | )); |
||
22 | } |
||
23 | 11 | $this->routes[$routeName] = $routeData; |
|
24 | 11 | } |
|
34 |