| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function isWritable($object, $propertyPath) |
||
| 32 | { |
||
| 33 | $classRef = new \ReflectionClass(get_class($object)); |
||
| 34 | |||
| 35 | if (!$classRef->hasProperty($propertyPath)) { |
||
| 36 | return false; |
||
| 37 | } |
||
| 38 | |||
| 39 | $property = $classRef->getProperty($propertyPath); |
||
| 40 | if ($this->onlyPublicProperties && !$property->isPublic()) { |
||
| 41 | return false; |
||
| 42 | } |
||
| 43 | |||
| 44 | return true; |
||
| 45 | } |
||
| 46 | |||
| 61 | } |