| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4.5923 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 39 | 2 | private function setValue(ClassField $field, $value, $resultInstance): void |
|
| 40 | { |
||
| 41 | 2 | if ($value === null && $field->hasDefaultValue()) { |
|
| 42 | return; |
||
| 43 | } |
||
| 44 | |||
| 45 | 2 | if ($field->isPublic()) { |
|
| 46 | 2 | $resultInstance->{$field->getName()} = $value; |
|
| 47 | } else { |
||
| 48 | $resultInstance->{$field->getSetter()}($value); |
||
| 49 | } |
||
| 57 |