| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 3 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 57 | 3 | protected function merge(array $list) |
|
|
|
|||
| 58 | { |
||
| 59 | 3 | foreach ($list as &$item) { |
|
| 60 | 3 | if (is_object($item)) { |
|
| 61 | 2 | $item = get_object_vars($item); |
|
| 62 | 2 | } |
|
| 63 | 3 | } |
|
| 64 | |||
| 65 | 3 | $result = call_user_func_array('array_merge', $list); |
|
| 66 | |||
| 67 | // Is associative array |
||
| 68 | 3 | if (array_keys($result) !== array_keys(array_keys($result))) { |
|
| 69 | 2 | $result = (object)$result; |
|
| 70 | 2 | } |
|
| 71 | |||
| 72 | 3 | return $result; |
|
| 73 | } |
||
| 74 | } |
||
| 75 |