Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2666-2675 (lines=10) @@
2663
     * @return static
2664
     *                <p>(Immutable)</p>
2665
     */
2666
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2667
    {
2668
        if ($recursive === true) {
2669
            $result = \array_replace_recursive($this->getArray(), $array);
2670
        } else {
2671
            $result = \array_replace($this->getArray(), $array);
2672
        }
2673
2674
        return static::create(
2675
            $result,
2676
            $this->iteratorClass,
2677
            false
2678
        );
@@ 2693-2702 (lines=10) @@
2690
     * @return static
2691
     *                <p>(Immutable)</p>
2692
     */
2693
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
2694
    {
2695
        if ($recursive === true) {
2696
            $result = \array_merge_recursive($this->getArray(), $array);
2697
        } else {
2698
            $result = \array_merge($this->getArray(), $array);
2699
        }
2700
2701
        return static::create(
2702
            $result,
2703
            $this->iteratorClass,
2704
            false
2705
        );
@@ 2719-2728 (lines=10) @@
2716
     * @return static
2717
     *                <p>(Immutable)</p>
2718
     */
2719
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
2720
    {
2721
        if ($recursive === true) {
2722
            $result = \array_replace_recursive($array, $this->getArray());
2723
        } else {
2724
            $result = \array_replace($array, $this->getArray());
2725
        }
2726
2727
        return static::create(
2728
            $result,
2729
            $this->iteratorClass,
2730
            false
2731
        );
@@ 2746-2755 (lines=10) @@
2743
     * @return static
2744
     *                <p>(Immutable)</p>
2745
     */
2746
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
2747
    {
2748
        if ($recursive === true) {
2749
            $result = \array_merge_recursive($array, $this->getArray());
2750
        } else {
2751
            $result = \array_merge($array, $this->getArray());
2752
        }
2753
2754
        return static::create(
2755
            $result,
2756
            $this->iteratorClass,
2757
            false
2758
        );