Conditions | 3 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | protected function fillFromParameters(array $parameters = []): void |
||
13 | { |
||
14 | foreach ($parameters as $property => $value) { |
||
15 | if (!\property_exists($this, $camel = $this->toCamel($property))) { |
||
16 | throw new \RuntimeException(\sprintf('Property %s for class %s doesn\'t exists', $property, \get_class($this))); |
||
17 | } |
||
18 | |||
19 | $this->$camel = $value; |
||
20 | } |
||
35 |