| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | private function write( |
||
| 45 | ReflectionClass $object, |
||
| 46 | object $target, |
||
| 47 | string $name, |
||
| 48 | $value |
||
| 49 | ): void { |
||
| 50 | while ($object && !$object->hasProperty($name)) { |
||
| 51 | $object = $object->getParentClass(); |
||
| 52 | } |
||
| 53 | // @todo if !object, write as public? |
||
| 54 | $property = $object->getProperty($name); |
||
| 55 | $property->setAccessible(true); |
||
| 56 | $property->setValue($target, $value); |
||
| 57 | } |
||
| 59 |