| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| 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) { |
||
| 33 | return ! is_null($value); |
||
| 34 | }); |
||
| 37 |