| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 45 | public function fillWithSnakeParams(array $params, $glue = '_') |
|
| 39 | { |
||
| 40 | 45 | $thisObject = new \ReflectionClass($this); |
|
| 41 | 45 | $properties = $thisObject->getProperties(); |
|
| 42 | 45 | foreach ($properties as $property) { |
|
| 43 | 45 | $snakeProperty = $this->fromCamelCase($property->getName(), $glue); |
|
| 44 | 45 | if (isset($params[$snakeProperty])) { |
|
| 45 | 20 | $this->{$property->getName()} = $params[$snakeProperty]; |
|
| 46 | } |
||
| 50 |