| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.7085 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 3 | public function load() |
|
| 28 | { |
||
| 29 | 3 | $entries = $this->parse($this->path); |
|
| 30 | |||
| 31 | 3 | if (!empty($this->rootKey)) { |
|
| 32 | if (!isset($entries[$this->rootKey])) { |
||
| 33 | throw new \InvalidArgumentException('Manifest file contains no '.$this->rootKey.' key'); |
||
| 34 | } |
||
| 35 | |||
| 36 | $entries = $entries[$this->rootKey]; |
||
| 37 | } |
||
| 38 | |||
| 39 | 3 | return new Manifest($entries); |
|
| 40 | } |
||
| 41 | |||
| 50 |
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.