| @@ 2961-2970 (lines=10) @@ | ||
| 2958 | * @return static | |
| 2959 | * <p>(Immutable)</p> | |
| 2960 | */ | |
| 2961 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self | |
| 2962 |     { | |
| 2963 |         if ($recursive === true) { | |
| 2964 | $result = \array_replace_recursive($this->getArray(), $array); | |
| 2965 |         } else { | |
| 2966 | $result = \array_replace($this->getArray(), $array); | |
| 2967 | } | |
| 2968 | ||
| 2969 | return static::create( | |
| 2970 | $result, | |
| 2971 | $this->iteratorClass, | |
| 2972 | false | |
| 2973 | ); | |
| @@ 2988-2997 (lines=10) @@ | ||
| 2985 | * @return static | |
| 2986 | * <p>(Immutable)</p> | |
| 2987 | */ | |
| 2988 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self | |
| 2989 |     { | |
| 2990 |         if ($recursive === true) { | |
| 2991 | $result = \array_merge_recursive($this->getArray(), $array); | |
| 2992 |         } else { | |
| 2993 | $result = \array_merge($this->getArray(), $array); | |
| 2994 | } | |
| 2995 | ||
| 2996 | return static::create( | |
| 2997 | $result, | |
| 2998 | $this->iteratorClass, | |
| 2999 | false | |
| 3000 | ); | |
| @@ 3014-3023 (lines=10) @@ | ||
| 3011 | * @return static | |
| 3012 | * <p>(Immutable)</p> | |
| 3013 | */ | |
| 3014 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self | |
| 3015 |     { | |
| 3016 |         if ($recursive === true) { | |
| 3017 | $result = \array_replace_recursive($array, $this->getArray()); | |
| 3018 |         } else { | |
| 3019 | $result = \array_replace($array, $this->getArray()); | |
| 3020 | } | |
| 3021 | ||
| 3022 | return static::create( | |
| 3023 | $result, | |
| 3024 | $this->iteratorClass, | |
| 3025 | false | |
| 3026 | ); | |
| @@ 3041-3050 (lines=10) @@ | ||
| 3038 | * @return static | |
| 3039 | * <p>(Immutable)</p> | |
| 3040 | */ | |
| 3041 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self | |
| 3042 |     { | |
| 3043 |         if ($recursive === true) { | |
| 3044 | $result = \array_merge_recursive($array, $this->getArray()); | |
| 3045 |         } else { | |
| 3046 | $result = \array_merge($array, $this->getArray()); | |
| 3047 | } | |
| 3048 | ||
| 3049 | return static::create( | |
| 3050 | $result, | |
| 3051 | $this->iteratorClass, | |
| 3052 | false | |
| 3053 | ); | |