Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2814-2823 (lines=10) @@
2811
     * @return static
2812
     *                <p>(Immutable)</p>
2813
     */
2814
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2815
    {
2816
        if ($recursive === true) {
2817
            $result = \array_replace_recursive($this->getArray(), $array);
2818
        } else {
2819
            $result = \array_replace($this->getArray(), $array);
2820
        }
2821
2822
        return static::create(
2823
            $result,
2824
            $this->iteratorClass,
2825
            false
2826
        );
@@ 2841-2850 (lines=10) @@
2838
     * @return static
2839
     *                <p>(Immutable)</p>
2840
     */
2841
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2842
    {
2843
        if ($recursive === true) {
2844
            $result = \array_merge_recursive($this->getArray(), $array);
2845
        } else {
2846
            $result = \array_merge($this->getArray(), $array);
2847
        }
2848
2849
        return static::create(
2850
            $result,
2851
            $this->iteratorClass,
2852
            false
2853
        );
@@ 2867-2876 (lines=10) @@
2864
     * @return static
2865
     *                <p>(Immutable)</p>
2866
     */
2867
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2868
    {
2869
        if ($recursive === true) {
2870
            $result = \array_replace_recursive($array, $this->getArray());
2871
        } else {
2872
            $result = \array_replace($array, $this->getArray());
2873
        }
2874
2875
        return static::create(
2876
            $result,
2877
            $this->iteratorClass,
2878
            false
2879
        );
@@ 2894-2903 (lines=10) @@
2891
     * @return static
2892
     *                <p>(Immutable)</p>
2893
     */
2894
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2895
    {
2896
        if ($recursive === true) {
2897
            $result = \array_merge_recursive($array, $this->getArray());
2898
        } else {
2899
            $result = \array_merge($array, $this->getArray());
2900
        }
2901
2902
        return static::create(
2903
            $result,
2904
            $this->iteratorClass,
2905
            false
2906
        );