Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2365-2374 (lines=10) @@
2362
     * @return static
2363
     *                <p>(Immutable)</p>
2364
     */
2365
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2366
    {
2367
        if ($recursive === true) {
2368
            $result = \array_replace_recursive($this->array, $array);
2369
        } else {
2370
            $result = \array_replace($this->array, $array);
2371
        }
2372
2373
        return static::create($result, $this->iteratorClass, false);
2374
    }
2375
2376
    /**
2377
     * Merge the new $array into the current array.
@@ 2388-2397 (lines=10) @@
2385
     * @return static
2386
     *                <p>(Immutable)</p>
2387
     */
2388
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2389
    {
2390
        if ($recursive === true) {
2391
            $result = \array_merge_recursive($this->array, $array);
2392
        } else {
2393
            $result = \array_merge($this->array, $array);
2394
        }
2395
2396
        return static::create($result, $this->iteratorClass, false);
2397
    }
2398
2399
    /**
2400
     * Merge the the current array into the $array.
@@ 2410-2419 (lines=10) @@
2407
     * @return static
2408
     *                <p>(Immutable)</p>
2409
     */
2410
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2411
    {
2412
        if ($recursive === true) {
2413
            $result = \array_replace_recursive($array, $this->array);
2414
        } else {
2415
            $result = \array_replace($array, $this->array);
2416
        }
2417
2418
        return static::create($result, $this->iteratorClass, false);
2419
    }
2420
2421
    /**
2422
     * Merge the current array into the new $array.
@@ 2433-2442 (lines=10) @@
2430
     * @return static
2431
     *                <p>(Immutable)</p>
2432
     */
2433
    public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2434
    {
2435
        if ($recursive === true) {
2436
            $result = \array_merge_recursive($array, $this->array);
2437
        } else {
2438
            $result = \array_merge($array, $this->array);
2439
        }
2440
2441
        return static::create($result, $this->iteratorClass, false);
2442
    }
2443
2444
    /**
2445
     * @return ArrayyMeta|static