| Conditions | 4 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | public function getArrayCopy() |
||
| 20 | { |
||
| 21 | $currentValues = array_map(function ($value) { |
||
| 22 | if (is_object($value)) { |
||
| 23 | if ($value instanceof ArraySerializableInterface) { |
||
| 24 | return $value->getArrayCopy(); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $value; |
||
| 29 | }, get_object_vars($this)); |
||
| 30 | |||
| 31 | // Filter out null values and return the remaining. |
||
| 32 | return array_filter($currentValues, function ($value, $key) { |
||
| 33 | return ! is_null($value) && $key !== 'owner'; |
||
| 34 | }, ARRAY_FILTER_USE_BOTH); |
||
| 35 | } |
||
| 37 |