| @@ 90-98 (lines=9) @@ | ||
| 87 | } elseif (!in_array($value, $first, true)) { // Checks if value already exists in array |
|
| 88 | $first[] = $value; |
|
| 89 | } |
|
| 90 | } else { |
|
| 91 | if (!array_key_exists($idx, $first)) { |
|
| 92 | $first[$idx] = $value; |
|
| 93 | } else { |
|
| 94 | if (is_array($value)) { |
|
| 95 | $first[$idx] = self::arrayMergeRecursiveAppendDistinct($first[$idx], $value); |
|
| 96 | } |
|
| 97 | } |
|
| 98 | } |
|
| 99 | } |
|
| 100 | ||
| 101 | return $first; |
|
| @@ 277-281 (lines=5) @@ | ||
| 274 | $first[$idx] = $value; |
|
| 275 | } else { |
|
| 276 | if (is_array($value)) { |
|
| 277 | if (is_array($first[$idx])) { |
|
| 278 | $first[$idx] = self::arrayMergeRecursiveDistinct($first[$idx], $value); |
|
| 279 | } else { |
|
| 280 | $first[$idx] = $value; |
|
| 281 | } |
|
| 282 | } else { |
|
| 283 | $first[$idx] = $value; |
|
| 284 | } |
|