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