Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2753-2762 (lines=10) @@
2750
     * @return static
2751
     *                <p>(Immutable)</p>
2752
     */
2753
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2754
    {
2755
        if ($recursive === true) {
2756
            $result = \array_replace_recursive($this->array, $array);
2757
        } else {
2758
            $result = \array_replace($this->array, $array);
2759
        }
2760
2761
        return static::create($result, $this->iteratorClass, false);
2762
    }
2763
2764
    /**
2765
     * Merge the new $array into the current array.
@@ 2776-2785 (lines=10) @@
2773
     * @return static
2774
     *                <p>(Immutable)</p>
2775
     */
2776
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2777
    {
2778
        if ($recursive === true) {
2779
            $result = \array_merge_recursive($this->array, $array);
2780
        } else {
2781
            $result = \array_merge($this->array, $array);
2782
        }
2783
2784
        return static::create($result, $this->iteratorClass, false);
2785
    }
2786
2787
    /**
2788
     * Merge the the current array into the $array.
@@ 2798-2807 (lines=10) @@
2795
     * @return static
2796
     *                <p>(Immutable)</p>
2797
     */
2798
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2799
    {
2800
        if ($recursive === true) {
2801
            $result = \array_replace_recursive($array, $this->array);
2802
        } else {
2803
            $result = \array_replace($array, $this->array);
2804
        }
2805
2806
        return static::create($result, $this->iteratorClass, false);
2807
    }
2808
2809
    /**
2810
     * Merge the current array into the new $array.
@@ 2821-2830 (lines=10) @@
2818
     * @return static
2819
     *                <p>(Immutable)</p>
2820
     */
2821
    public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2822
    {
2823
        if ($recursive === true) {
2824
            $result = \array_merge_recursive($array, $this->array);
2825
        } else {
2826
            $result = \array_merge($array, $this->array);
2827
        }
2828
2829
        return static::create($result, $this->iteratorClass, false);
2830
    }
2831
2832
    /**
2833
     * @return ArrayyMeta|static