| Conditions | 3 |
| Paths | 4 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 1 | public function init($type) { |
|
| 31 | 1 | $this->sriFilename = $type === 'js' ? JS_SRI_FILENAME : CSS_SRI_FILENAME; |
|
| 32 | /** @var Cache $cache */ |
||
| 33 | 1 | $cache = Cache::getInstance(); |
|
| 34 | 1 | $this->sri = $cache->getDataFromFile($this->sriFilename, Cache::JSON, true); |
|
| 35 | 1 | if(empty($this->sri)) { |
|
| 36 | 1 | $this->sri = []; |
|
| 37 | } |
||
| 58 | } |