Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
50 | public function setValue(&$object, $propertyPath, $value) |
||
51 | { |
||
52 | if ($this->isWritable($object, $propertyPath)) { |
||
53 | $property = new \ReflectionProperty(get_class($object), $propertyPath); |
||
54 | if (!$property->isPublic()) { |
||
55 | $property->setAccessible(true); |
||
56 | } |
||
57 | |||
58 | $property->setValue($object, $value); |
||
59 | } |
||
60 | } |
||
61 | } |