Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | protected function getSource($packagePath) |
||
28 | { |
||
29 | $sources = [ |
||
30 | "{$packagePath}/resources/routes.php", |
||
31 | "{$packagePath}/src/Http/routes.php", |
||
32 | "{$packagePath}/src/routes.php", |
||
33 | ]; |
||
34 | |||
35 | foreach ($sources as $source) { |
||
36 | if ($this->files->isFile($source)) { |
||
37 | return $source; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | throw new InvalidArgumentException('Routes not found.'); |
||
42 | } |
||
43 | } |
||
44 |