| @@ 2579-2588 (lines=10) @@ | ||
| 2576 | * @return static |
|
| 2577 | * <p>(Immutable)</p> |
|
| 2578 | */ |
|
| 2579 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2580 | { |
|
| 2581 | if ($recursive === true) { |
|
| 2582 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2583 | } else { |
|
| 2584 | $result = \array_replace($this->getArray(), $array); |
|
| 2585 | } |
|
| 2586 | ||
| 2587 | return static::create( |
|
| 2588 | $result, |
|
| 2589 | $this->iteratorClass, |
|
| 2590 | false |
|
| 2591 | ); |
|
| @@ 2606-2615 (lines=10) @@ | ||
| 2603 | * @return static |
|
| 2604 | * <p>(Immutable)</p> |
|
| 2605 | */ |
|
| 2606 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2607 | { |
|
| 2608 | if ($recursive === true) { |
|
| 2609 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2610 | } else { |
|
| 2611 | $result = \array_merge($this->getArray(), $array); |
|
| 2612 | } |
|
| 2613 | ||
| 2614 | return static::create( |
|
| 2615 | $result, |
|
| 2616 | $this->iteratorClass, |
|
| 2617 | false |
|
| 2618 | ); |
|
| @@ 2632-2641 (lines=10) @@ | ||
| 2629 | * @return static |
|
| 2630 | * <p>(Immutable)</p> |
|
| 2631 | */ |
|
| 2632 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2633 | { |
|
| 2634 | if ($recursive === true) { |
|
| 2635 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2636 | } else { |
|
| 2637 | $result = \array_replace($array, $this->getArray()); |
|
| 2638 | } |
|
| 2639 | ||
| 2640 | return static::create( |
|
| 2641 | $result, |
|
| 2642 | $this->iteratorClass, |
|
| 2643 | false |
|
| 2644 | ); |
|
| @@ 2659-2668 (lines=10) @@ | ||
| 2656 | * @return static |
|
| 2657 | * <p>(Immutable)</p> |
|
| 2658 | */ |
|
| 2659 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2660 | { |
|
| 2661 | if ($recursive === true) { |
|
| 2662 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2663 | } else { |
|
| 2664 | $result = \array_merge($array, $this->getArray()); |
|
| 2665 | } |
|
| 2666 | ||
| 2667 | return static::create( |
|
| 2668 | $result, |
|
| 2669 | $this->iteratorClass, |
|
| 2670 | false |
|
| 2671 | ); |
|