Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2781-2790 (lines=10) @@
2778
     * @return static
2779
     *                <p>(Immutable)</p>
2780
     */
2781
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2782
    {
2783
        if ($recursive === true) {
2784
            $result = \array_replace_recursive($this->getArray(), $array);
2785
        } else {
2786
            $result = \array_replace($this->getArray(), $array);
2787
        }
2788
2789
        return static::create(
2790
            $result,
2791
            $this->iteratorClass,
2792
            false
2793
        );
@@ 2808-2817 (lines=10) @@
2805
     * @return static
2806
     *                <p>(Immutable)</p>
2807
     */
2808
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2809
    {
2810
        if ($recursive === true) {
2811
            $result = \array_merge_recursive($this->getArray(), $array);
2812
        } else {
2813
            $result = \array_merge($this->getArray(), $array);
2814
        }
2815
2816
        return static::create(
2817
            $result,
2818
            $this->iteratorClass,
2819
            false
2820
        );
@@ 2834-2843 (lines=10) @@
2831
     * @return static
2832
     *                <p>(Immutable)</p>
2833
     */
2834
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2835
    {
2836
        if ($recursive === true) {
2837
            $result = \array_replace_recursive($array, $this->getArray());
2838
        } else {
2839
            $result = \array_replace($array, $this->getArray());
2840
        }
2841
2842
        return static::create(
2843
            $result,
2844
            $this->iteratorClass,
2845
            false
2846
        );
@@ 2861-2870 (lines=10) @@
2858
     * @return static
2859
     *                <p>(Immutable)</p>
2860
     */
2861
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2862
    {
2863
        if ($recursive === true) {
2864
            $result = \array_merge_recursive($array, $this->getArray());
2865
        } else {
2866
            $result = \array_merge($array, $this->getArray());
2867
        }
2868
2869
        return static::create(
2870
            $result,
2871
            $this->iteratorClass,
2872
            false
2873
        );