Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2844-2853 (lines=10) @@
2841
     * @return static
2842
     *                <p>(Immutable)</p>
2843
     */
2844
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2845
    {
2846
        if ($recursive === true) {
2847
            $result = \array_replace_recursive($this->getArray(), $array);
2848
        } else {
2849
            $result = \array_replace($this->getArray(), $array);
2850
        }
2851
2852
        return static::create(
2853
            $result,
2854
            $this->iteratorClass,
2855
            false
2856
        );
@@ 2871-2880 (lines=10) @@
2868
     * @return static
2869
     *                <p>(Immutable)</p>
2870
     */
2871
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2872
    {
2873
        if ($recursive === true) {
2874
            $result = \array_merge_recursive($this->getArray(), $array);
2875
        } else {
2876
            $result = \array_merge($this->getArray(), $array);
2877
        }
2878
2879
        return static::create(
2880
            $result,
2881
            $this->iteratorClass,
2882
            false
2883
        );
@@ 2897-2906 (lines=10) @@
2894
     * @return static
2895
     *                <p>(Immutable)</p>
2896
     */
2897
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2898
    {
2899
        if ($recursive === true) {
2900
            $result = \array_replace_recursive($array, $this->getArray());
2901
        } else {
2902
            $result = \array_replace($array, $this->getArray());
2903
        }
2904
2905
        return static::create(
2906
            $result,
2907
            $this->iteratorClass,
2908
            false
2909
        );
@@ 2924-2933 (lines=10) @@
2921
     * @return static
2922
     *                <p>(Immutable)</p>
2923
     */
2924
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2925
    {
2926
        if ($recursive === true) {
2927
            $result = \array_merge_recursive($array, $this->getArray());
2928
        } else {
2929
            $result = \array_merge($array, $this->getArray());
2930
        }
2931
2932
        return static::create(
2933
            $result,
2934
            $this->iteratorClass,
2935
            false
2936
        );