| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 2 | public function connect(string $route, string $controller, string $action) |
|
| 32 | { |
||
| 33 | 2 | if (isset($this->routes[$route]) === true) { |
|
| 34 | 1 | throw new RouteAlreadyConnectedException([$route]); |
|
| 35 | } |
||
| 36 | |||
| 37 | 2 | $this->routes[$route] = [ |
|
| 38 | 2 | 'controller' => $controller, |
|
| 39 | 2 | 'action' => $action |
|
| 40 | ]; |
||
| 41 | 2 | } |
|
| 42 | |||
| 63 |