Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5.025 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | 7 | protected function buildSource($source, $type) |
|
34 | { |
||
35 | 7 | if (empty($source)) { |
|
36 | 1 | return $source; |
|
37 | } |
||
38 | 6 | if ($this->isFullPath($source)) { |
|
39 | 4 | return $source; |
|
40 | } |
||
41 | 2 | if ($type === Asset::TYPE_STYLES) { |
|
42 | 1 | return $this->transformSourceWithAsset('/stylesheets/'.$source.'.css'); |
|
43 | } |
||
44 | 1 | if ($type === Asset::TYPE_SCRIPTS) { |
|
45 | 1 | return $this->transformSourceWithAsset('/scripts/'.$source.'.js'); |
|
46 | } |
||
47 | |||
48 | return $source; |
||
49 | } |
||
76 |