| Conditions | 6 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 10.5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 3 | public function getArrayCopy() |
|
| 43 | { |
||
| 44 | 3 | $array = get_object_vars($this); |
|
| 45 | |||
| 46 | 3 | foreach ($array as $key => &$value) { |
|
| 47 | 3 | if ($value instanceof Base) { |
|
| 48 | $array[$key] = $value->getArrayCopy(); |
||
| 49 | 3 | } else if (is_array($value)) { |
|
| 50 | foreach ($value as $k => $v) { |
||
| 51 | if ($v instanceof Base) { |
||
| 52 | $value[$k] = $v->getArrayCopy(); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 | 3 | } |
|
| 57 | 3 | return $array; |
|
| 58 | } |
||
| 59 | |||
| 80 |