Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2749-2758 (lines=10) @@
2746
     * @return static
2747
     *                <p>(Immutable)</p>
2748
     */
2749
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2750
    {
2751
        if ($recursive === true) {
2752
            $result = \array_replace_recursive($this->array, $array);
2753
        } else {
2754
            $result = \array_replace($this->array, $array);
2755
        }
2756
2757
        return static::create($result, $this->iteratorClass, false);
2758
    }
2759
2760
    /**
2761
     * Merge the new $array into the current array.
@@ 2772-2781 (lines=10) @@
2769
     * @return static
2770
     *                <p>(Immutable)</p>
2771
     */
2772
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2773
    {
2774
        if ($recursive === true) {
2775
            $result = \array_merge_recursive($this->array, $array);
2776
        } else {
2777
            $result = \array_merge($this->array, $array);
2778
        }
2779
2780
        return static::create($result, $this->iteratorClass, false);
2781
    }
2782
2783
    /**
2784
     * Merge the the current array into the $array.
@@ 2794-2803 (lines=10) @@
2791
     * @return static
2792
     *                <p>(Immutable)</p>
2793
     */
2794
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2795
    {
2796
        if ($recursive === true) {
2797
            $result = \array_replace_recursive($array, $this->array);
2798
        } else {
2799
            $result = \array_replace($array, $this->array);
2800
        }
2801
2802
        return static::create($result, $this->iteratorClass, false);
2803
    }
2804
2805
    /**
2806
     * Merge the current array into the new $array.
@@ 2817-2826 (lines=10) @@
2814
     * @return static
2815
     *                <p>(Immutable)</p>
2816
     */
2817
    public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2818
    {
2819
        if ($recursive === true) {
2820
            $result = \array_merge_recursive($array, $this->array);
2821
        } else {
2822
            $result = \array_merge($array, $this->array);
2823
        }
2824
2825
        return static::create($result, $this->iteratorClass, false);
2826
    }
2827
2828
    /**
2829
     * @return ArrayyMeta|static