Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
43 | 7 | public function load() |
|
44 | { |
||
45 | 7 | $entries = $this->parse($this->path); |
|
46 | |||
47 | 7 | if (!empty($this->rootKey)) { |
|
48 | 2 | if (!isset($entries[$this->rootKey])) { |
|
49 | 1 | throw new \InvalidArgumentException('Manifest file contains no '.$this->rootKey.' key'); |
|
50 | } |
||
51 | |||
52 | 1 | $entries = $entries[$this->rootKey]; |
|
53 | } |
||
54 | |||
55 | 6 | return new Manifest($entries); |
|
56 | } |
||
57 | |||
66 |