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