Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
11 | private function setProperty($object, string $propertyName, $propertyValue): void |
||
12 | { |
||
13 | $refObject = new \ReflectionObject($object); |
||
14 | |||
15 | $refProperty = $refObject->getProperty($propertyName); |
||
16 | $refProperty->setAccessible(true); |
||
17 | $refProperty->setValue($object, $propertyValue); |
||
18 | } |
||
20 |