| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 98 | 2 | public function toArray(): array |
|
| 99 | { |
||
| 100 | 2 | $missing = array_diff_key(array_flip($this->required()), $this->variables); |
|
| 101 | |||
| 102 | 2 | if (!empty($missing)) { |
|
| 103 | 1 | throw new InvalidArgumentException('Keys missing [' . implode(',', $missing) . ']'); |
|
| 104 | } |
||
| 105 | |||
| 106 | 2 | return $this->variables; |
|
| 107 | } |
||
| 109 |