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