@@ -114,11 +114,15 @@ discard block |
||
| 114 | 114 | $arrays = func_get_args(); |
| 115 | 115 | $base = array_shift($arrays); |
| 116 | 116 | |
| 117 | - if (!is_array($base)) $base = empty($base) ? array() : array($base); |
|
| 117 | + if (!is_array($base)) { |
|
| 118 | + $base = empty($base) ? array() : array($base); |
|
| 119 | + } |
|
| 118 | 120 | |
| 119 | 121 | foreach ($arrays as $append) { |
| 120 | 122 | |
| 121 | - if (!is_array($append)) $append = array($append); |
|
| 123 | + if (!is_array($append)) { |
|
| 124 | + $append = array($append); |
|
| 125 | + } |
|
| 122 | 126 | |
| 123 | 127 | foreach ($append as $key => $value) { |
| 124 | 128 | |
@@ -130,7 +134,9 @@ discard block |
||
| 130 | 134 | if (is_array($value) or is_array($base[$key])) { |
| 131 | 135 | $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]); |
| 132 | 136 | } else if (is_numeric($key)) { |
| 133 | - if (!in_array($value, $base)) $base[] = $value; |
|
| 137 | + if (!in_array($value, $base)) { |
|
| 138 | + $base[] = $value; |
|
| 139 | + } |
|
| 134 | 140 | } else { |
| 135 | 141 | $base[$key] = $value; |
| 136 | 142 | } |