| @@ 3024-3033 (lines=10) @@ | ||
| 3021 | * |
|
| 3022 | * @psalm-param array<mixed,mixed>|array<TKey,T> $array |
|
| 3023 | */ |
|
| 3024 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 3025 | { |
|
| 3026 | if ($recursive === true) { |
|
| 3027 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 3028 | } else { |
|
| 3029 | $result = \array_replace($this->getArray(), $array); |
|
| 3030 | } |
|
| 3031 | ||
| 3032 | return static::create( |
|
| 3033 | $result, |
|
| 3034 | $this->iteratorClass, |
|
| 3035 | false |
|
| 3036 | ); |
|
| @@ 3053-3062 (lines=10) @@ | ||
| 3050 | * |
|
| 3051 | * @psalm-param array<mixed,mixed>|array<TKey,T> $array |
|
| 3052 | */ |
|
| 3053 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 3054 | { |
|
| 3055 | if ($recursive === true) { |
|
| 3056 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 3057 | } else { |
|
| 3058 | $result = \array_merge($this->getArray(), $array); |
|
| 3059 | } |
|
| 3060 | ||
| 3061 | return static::create( |
|
| 3062 | $result, |
|
| 3063 | $this->iteratorClass, |
|
| 3064 | false |
|
| 3065 | ); |
|
| @@ 3081-3090 (lines=10) @@ | ||
| 3078 | * |
|
| 3079 | * @psalm-param array<mixed,mixed>|array<TKey,T> $array |
|
| 3080 | */ |
|
| 3081 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 3082 | { |
|
| 3083 | if ($recursive === true) { |
|
| 3084 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 3085 | } else { |
|
| 3086 | $result = \array_replace($array, $this->getArray()); |
|
| 3087 | } |
|
| 3088 | ||
| 3089 | return static::create( |
|
| 3090 | $result, |
|
| 3091 | $this->iteratorClass, |
|
| 3092 | false |
|
| 3093 | ); |
|
| @@ 3110-3119 (lines=10) @@ | ||
| 3107 | * |
|
| 3108 | * @psalm-param array<mixed,mixed>|array<TKey,T> $array |
|
| 3109 | */ |
|
| 3110 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 3111 | { |
|
| 3112 | if ($recursive === true) { |
|
| 3113 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 3114 | } else { |
|
| 3115 | $result = \array_merge($array, $this->getArray()); |
|
| 3116 | } |
|
| 3117 | ||
| 3118 | return static::create( |
|
| 3119 | $result, |
|
| 3120 | $this->iteratorClass, |
|
| 3121 | false |
|
| 3122 | ); |
|