Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2657-2666 (lines=10) @@
2654
     * @return static
2655
     *                <p>(Immutable)</p>
2656
     */
2657
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2658
    {
2659
        if ($recursive === true) {
2660
            $result = \array_replace_recursive($this->getArray(), $array);
2661
        } else {
2662
            $result = \array_replace($this->getArray(), $array);
2663
        }
2664
2665
        return static::create(
2666
            $result,
2667
            $this->iteratorClass,
2668
            false
2669
        );
@@ 2684-2693 (lines=10) @@
2681
     * @return static
2682
     *                <p>(Immutable)</p>
2683
     */
2684
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2685
    {
2686
        if ($recursive === true) {
2687
            $result = \array_merge_recursive($this->getArray(), $array);
2688
        } else {
2689
            $result = \array_merge($this->getArray(), $array);
2690
        }
2691
2692
        return static::create(
2693
            $result,
2694
            $this->iteratorClass,
2695
            false
2696
        );
@@ 2710-2719 (lines=10) @@
2707
     * @return static
2708
     *                <p>(Immutable)</p>
2709
     */
2710
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2711
    {
2712
        if ($recursive === true) {
2713
            $result = \array_replace_recursive($array, $this->getArray());
2714
        } else {
2715
            $result = \array_replace($array, $this->getArray());
2716
        }
2717
2718
        return static::create(
2719
            $result,
2720
            $this->iteratorClass,
2721
            false
2722
        );
@@ 2737-2746 (lines=10) @@
2734
     * @return static
2735
     *                <p>(Immutable)</p>
2736
     */
2737
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2738
    {
2739
        if ($recursive === true) {
2740
            $result = \array_merge_recursive($array, $this->getArray());
2741
        } else {
2742
            $result = \array_merge($array, $this->getArray());
2743
        }
2744
2745
        return static::create(
2746
            $result,
2747
            $this->iteratorClass,
2748
            false
2749
        );