| Conditions | 4 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | protected function extractObjectData($value, $ref, $properties) |
||
| 58 | { |
||
| 59 | $data = []; |
||
| 60 | foreach ($properties as $property) { |
||
| 61 | if (in_array($property, self::SKIP_PROPERTIES, true)) { |
||
| 62 | continue; |
||
| 63 | } |
||
| 64 | |||
| 65 | try { |
||
| 66 | $propRef = $ref->getProperty($property); |
||
| 67 | $propRef->setAccessible(true); |
||
| 68 | $data[$property] = $propRef->getValue($value); |
||
| 69 | } catch (ReflectionException $e) { |
||
| 70 | $data[$property] = $value->$property; |
||
| 71 | } |
||
| 72 | } |
||
| 73 | |||
| 74 | return $data; |
||
| 75 | } |
||
| 77 |