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