Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2652-2661 (lines=10) @@
2649
     * @return static
2650
     *                <p>(Immutable)</p>
2651
     */
2652
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2653
    {
2654
        if ($recursive === true) {
2655
            $result = \array_replace_recursive($this->getArray(), $array);
2656
        } else {
2657
            $result = \array_replace($this->getArray(), $array);
2658
        }
2659
2660
        return static::create(
2661
            $result,
2662
            $this->iteratorClass,
2663
            false
2664
        );
@@ 2679-2688 (lines=10) @@
2676
     * @return static
2677
     *                <p>(Immutable)</p>
2678
     */
2679
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2680
    {
2681
        if ($recursive === true) {
2682
            $result = \array_merge_recursive($this->getArray(), $array);
2683
        } else {
2684
            $result = \array_merge($this->getArray(), $array);
2685
        }
2686
2687
        return static::create(
2688
            $result,
2689
            $this->iteratorClass,
2690
            false
2691
        );
@@ 2705-2714 (lines=10) @@
2702
     * @return static
2703
     *                <p>(Immutable)</p>
2704
     */
2705
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2706
    {
2707
        if ($recursive === true) {
2708
            $result = \array_replace_recursive($array, $this->getArray());
2709
        } else {
2710
            $result = \array_replace($array, $this->getArray());
2711
        }
2712
2713
        return static::create(
2714
            $result,
2715
            $this->iteratorClass,
2716
            false
2717
        );
@@ 2732-2741 (lines=10) @@
2729
     * @return static
2730
     *                <p>(Immutable)</p>
2731
     */
2732
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2733
    {
2734
        if ($recursive === true) {
2735
            $result = \array_merge_recursive($array, $this->getArray());
2736
        } else {
2737
            $result = \array_merge($array, $this->getArray());
2738
        }
2739
2740
        return static::create(
2741
            $result,
2742
            $this->iteratorClass,
2743
            false
2744
        );