Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 134 | public function __construct(stdClass $data, string ...$meanLocation) |
|
19 | { |
||
20 | 134 | $this->data = $data; |
|
21 | 134 | $root = $this->findInDescendent($data, ...$meanLocation); |
|
22 | 134 | if (! $root instanceof stdClass) { |
|
23 | 1 | throw new InvalidArgumentException( |
|
24 | 1 | sprintf('Unable to find mean object at /%s', implode('/', $meanLocation)) |
|
25 | 1 | ); |
|
26 | } |
||
27 | 134 | $this->root = $root; |
|
28 | } |
||
60 |