Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 3144-3153 (lines=10) @@
3141
     * @psalm-param  array<mixed,mixed>|array<TKey,T> $array
3142
     * @psalm-return static<TKey,T>
3143
     */
3144
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
3145
    {
3146
        if ($recursive === true) {
3147
            $result = \array_replace_recursive($this->getArray(), $array);
3148
        } else {
3149
            $result = \array_replace($this->getArray(), $array);
3150
        }
3151
3152
        return static::create(
3153
            $result,
3154
            $this->iteratorClass,
3155
            false
3156
        );
@@ 3174-3183 (lines=10) @@
3171
     * @psalm-param  array<mixed,mixed>|array<TKey,T> $array
3172
     * @psalm-return static<TKey,T>
3173
     */
3174
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
3175
    {
3176
        if ($recursive === true) {
3177
            $result = \array_merge_recursive($this->getArray(), $array);
3178
        } else {
3179
            $result = \array_merge($this->getArray(), $array);
3180
        }
3181
3182
        return static::create(
3183
            $result,
3184
            $this->iteratorClass,
3185
            false
3186
        );
@@ 3203-3212 (lines=10) @@
3200
     * @psalm-param  array<mixed,mixed>|array<TKey,T> $array
3201
     * @psalm-return static<TKey,T>
3202
     */
3203
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
3204
    {
3205
        if ($recursive === true) {
3206
            $result = \array_replace_recursive($array, $this->getArray());
3207
        } else {
3208
            $result = \array_replace($array, $this->getArray());
3209
        }
3210
3211
        return static::create(
3212
            $result,
3213
            $this->iteratorClass,
3214
            false
3215
        );
@@ 3233-3242 (lines=10) @@
3230
     * @psalm-param  array<mixed,mixed>|array<TKey,T> $array
3231
     * @psalm-return static<TKey,T>
3232
     */
3233
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
3234
    {
3235
        if ($recursive === true) {
3236
            $result = \array_merge_recursive($array, $this->getArray());
3237
        } else {
3238
            $result = \array_merge($array, $this->getArray());
3239
        }
3240
3241
        return static::create(
3242
            $result,
3243
            $this->iteratorClass,
3244
            false
3245
        );