Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | private function mustBeValid( |
||
14 | $context, |
||
15 | string $offset, |
||
16 | string ...$path |
||
17 | ): void { |
||
18 | if ($this->isValid($context, $offset)) { |
||
19 | return; |
||
20 | } |
||
21 | $inTheJson = $this; |
||
22 | assert($inTheJson instanceof Json); |
||
23 | throw PathLeadsNowhere::didNotFind($offset, $inTheJson, ...$path); |
||
24 | } |
||
31 |