| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 36 | public function __construct(array $params) |
|
| 19 | { |
||
| 20 | 36 | $thisObject = new \ReflectionClass($this); |
|
| 21 | 36 | $properties = $thisObject->getProperties(); |
|
| 22 | 36 | foreach ($properties as $property) { |
|
| 23 | 36 | $snakeProperty = $this->fromCamelCase($property->getName()); |
|
| 24 | 36 | if (isset($params[$snakeProperty])) { |
|
| 25 | 19 | $this->{$property->getName()} = $params[$snakeProperty]; |
|
| 26 | } |
||
| 44 | } |