Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2894-2903 (lines=10) @@
2891
     * @return static
2892
     *                <p>(Immutable)</p>
2893
     */
2894
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2895
    {
2896
        if ($recursive === true) {
2897
            $result = \array_replace_recursive($this->getArray(), $array);
2898
        } else {
2899
            $result = \array_replace($this->getArray(), $array);
2900
        }
2901
2902
        return static::create(
2903
            $result,
2904
            $this->iteratorClass,
2905
            false
2906
        );
@@ 2921-2930 (lines=10) @@
2918
     * @return static
2919
     *                <p>(Immutable)</p>
2920
     */
2921
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2922
    {
2923
        if ($recursive === true) {
2924
            $result = \array_merge_recursive($this->getArray(), $array);
2925
        } else {
2926
            $result = \array_merge($this->getArray(), $array);
2927
        }
2928
2929
        return static::create(
2930
            $result,
2931
            $this->iteratorClass,
2932
            false
2933
        );
@@ 2947-2956 (lines=10) @@
2944
     * @return static
2945
     *                <p>(Immutable)</p>
2946
     */
2947
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2948
    {
2949
        if ($recursive === true) {
2950
            $result = \array_replace_recursive($array, $this->getArray());
2951
        } else {
2952
            $result = \array_replace($array, $this->getArray());
2953
        }
2954
2955
        return static::create(
2956
            $result,
2957
            $this->iteratorClass,
2958
            false
2959
        );
@@ 2974-2983 (lines=10) @@
2971
     * @return static
2972
     *                <p>(Immutable)</p>
2973
     */
2974
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2975
    {
2976
        if ($recursive === true) {
2977
            $result = \array_merge_recursive($array, $this->getArray());
2978
        } else {
2979
            $result = \array_merge($array, $this->getArray());
2980
        }
2981
2982
        return static::create(
2983
            $result,
2984
            $this->iteratorClass,
2985
            false
2986
        );