| @@ 2636-2645 (lines=10) @@ | ||
| 2633 | * @return static |
|
| 2634 | * <p>(Immutable)</p> |
|
| 2635 | */ |
|
| 2636 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2637 | { |
|
| 2638 | if ($recursive === true) { |
|
| 2639 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2640 | } else { |
|
| 2641 | $result = \array_replace($this->getArray(), $array); |
|
| 2642 | } |
|
| 2643 | ||
| 2644 | return static::create( |
|
| 2645 | $result, |
|
| 2646 | $this->iteratorClass, |
|
| 2647 | false |
|
| 2648 | ); |
|
| @@ 2663-2672 (lines=10) @@ | ||
| 2660 | * @return static |
|
| 2661 | * <p>(Immutable)</p> |
|
| 2662 | */ |
|
| 2663 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2664 | { |
|
| 2665 | if ($recursive === true) { |
|
| 2666 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2667 | } else { |
|
| 2668 | $result = \array_merge($this->getArray(), $array); |
|
| 2669 | } |
|
| 2670 | ||
| 2671 | return static::create( |
|
| 2672 | $result, |
|
| 2673 | $this->iteratorClass, |
|
| 2674 | false |
|
| 2675 | ); |
|
| @@ 2689-2698 (lines=10) @@ | ||
| 2686 | * @return static |
|
| 2687 | * <p>(Immutable)</p> |
|
| 2688 | */ |
|
| 2689 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2690 | { |
|
| 2691 | if ($recursive === true) { |
|
| 2692 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2693 | } else { |
|
| 2694 | $result = \array_replace($array, $this->getArray()); |
|
| 2695 | } |
|
| 2696 | ||
| 2697 | return static::create( |
|
| 2698 | $result, |
|
| 2699 | $this->iteratorClass, |
|
| 2700 | false |
|
| 2701 | ); |
|
| @@ 2716-2725 (lines=10) @@ | ||
| 2713 | * @return static |
|
| 2714 | * <p>(Immutable)</p> |
|
| 2715 | */ |
|
| 2716 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2717 | { |
|
| 2718 | if ($recursive === true) { |
|
| 2719 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2720 | } else { |
|
| 2721 | $result = \array_merge($array, $this->getArray()); |
|
| 2722 | } |
|
| 2723 | ||
| 2724 | return static::create( |
|
| 2725 | $result, |
|
| 2726 | $this->iteratorClass, |
|
| 2727 | false |
|
| 2728 | ); |
|