Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2601-2610 (lines=10) @@
2598
     * @return static
2599
     *                <p>(Immutable)</p>
2600
     */
2601
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2602
    {
2603
        if ($recursive === true) {
2604
            $result = \array_replace_recursive($this->getArray(), $array);
2605
        } else {
2606
            $result = \array_replace($this->getArray(), $array);
2607
        }
2608
2609
        return static::create(
2610
            $result,
2611
            $this->iteratorClass,
2612
            false
2613
        );
@@ 2628-2637 (lines=10) @@
2625
     * @return static
2626
     *                <p>(Immutable)</p>
2627
     */
2628
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2629
    {
2630
        if ($recursive === true) {
2631
            $result = \array_merge_recursive($this->getArray(), $array);
2632
        } else {
2633
            $result = \array_merge($this->getArray(), $array);
2634
        }
2635
2636
        return static::create(
2637
            $result,
2638
            $this->iteratorClass,
2639
            false
2640
        );
@@ 2654-2663 (lines=10) @@
2651
     * @return static
2652
     *                <p>(Immutable)</p>
2653
     */
2654
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2655
    {
2656
        if ($recursive === true) {
2657
            $result = \array_replace_recursive($array, $this->getArray());
2658
        } else {
2659
            $result = \array_replace($array, $this->getArray());
2660
        }
2661
2662
        return static::create(
2663
            $result,
2664
            $this->iteratorClass,
2665
            false
2666
        );
@@ 2681-2690 (lines=10) @@
2678
     * @return static
2679
     *                <p>(Immutable)</p>
2680
     */
2681
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2682
    {
2683
        if ($recursive === true) {
2684
            $result = \array_merge_recursive($array, $this->getArray());
2685
        } else {
2686
            $result = \array_merge($array, $this->getArray());
2687
        }
2688
2689
        return static::create(
2690
            $result,
2691
            $this->iteratorClass,
2692
            false
2693
        );