Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
28 | 7 | public function decorateFile(AbstractFile $file) |
|
29 | { |
||
30 | 7 | foreach ($this->routes as $route) { |
|
31 | 7 | if ($route->matches($file)) { |
|
32 | 6 | $file->setOutputPath($route->buildOutputPath($file)); |
|
33 | 6 | $file->setRelativeUrl($route->buildRelativeUrl($file)); |
|
34 | |||
35 | 7 | return; |
|
36 | } |
||
37 | } |
||
38 | |||
39 | 2 | $file->setOutputPath($file->getBaseName() . DIRECTORY_SEPARATOR . 'index.html'); |
|
40 | 2 | $file->setRelativeUrl($file->getBaseName()); |
|
41 | 2 | } |
|
42 | } |
||
43 |