Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2522-2531 (lines=10) @@
2519
     * @return static
2520
     *                <p>(Immutable)</p>
2521
     */
2522
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2523
    {
2524
        if ($recursive === true) {
2525
            $result = \array_replace_recursive($this->getArray(), $array);
2526
        } else {
2527
            $result = \array_replace($this->getArray(), $array);
2528
        }
2529
2530
        return static::create(
2531
            $result,
2532
            $this->iteratorClass,
2533
            false
2534
        );
@@ 2549-2558 (lines=10) @@
2546
     * @return static
2547
     *                <p>(Immutable)</p>
2548
     */
2549
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2550
    {
2551
        if ($recursive === true) {
2552
            $result = \array_merge_recursive($this->getArray(), $array);
2553
        } else {
2554
            $result = \array_merge($this->getArray(), $array);
2555
        }
2556
2557
        return static::create(
2558
            $result,
2559
            $this->iteratorClass,
2560
            false
2561
        );
@@ 2575-2584 (lines=10) @@
2572
     * @return static
2573
     *                <p>(Immutable)</p>
2574
     */
2575
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2576
    {
2577
        if ($recursive === true) {
2578
            $result = \array_replace_recursive($array, $this->getArray());
2579
        } else {
2580
            $result = \array_replace($array, $this->getArray());
2581
        }
2582
2583
        return static::create(
2584
            $result,
2585
            $this->iteratorClass,
2586
            false
2587
        );
@@ 2602-2611 (lines=10) @@
2599
     * @return static
2600
     *                <p>(Immutable)</p>
2601
     */
2602
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2603
    {
2604
        if ($recursive === true) {
2605
            $result = \array_merge_recursive($array, $this->getArray());
2606
        } else {
2607
            $result = \array_merge($array, $this->getArray());
2608
        }
2609
2610
        return static::create(
2611
            $result,
2612
            $this->iteratorClass,
2613
            false
2614
        );