Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function fromArray(array $arrayData): void |
||
44 | { |
||
45 | foreach ($arrayData as $key => $value) { |
||
46 | if (!array_key_exists($key, $this->container)) { |
||
47 | throw new InvalidArgumentException( |
||
48 | sprintf('"%s" is not defined in ' . get_called_class(), $key), |
||
49 | 1000 |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | $this->container[$key] = $value; |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 |