| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 2 | public function loadRoutes(Router $router) : Router |
|
| 30 | { |
||
| 31 | 2 | foreach ($this->paths as $path) { |
|
| 32 | 2 | if (!file_exists($path)) { |
|
| 33 | 1 | throw new InvalidArgumentException('Route file does not exist at [' . $path . ']'); |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | include_once $path; |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | return $router; |
|
| 40 | } |
||
| 41 | } |
||
| 42 |