Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2485-2494 (lines=10) @@
2482
   *
2483
   * @return static <p>(Immutable)</p>
2484
   */
2485
  public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2486
  {
2487
    if (true === $recursive) {
2488
      $result = \array_replace_recursive($this->array, $array);
2489
    } else {
2490
      $result = \array_replace($this->array, $array);
2491
    }
2492
2493
    return static::create($result);
2494
  }
2495
2496
  /**
2497
   * Merge the new $array into the current array.
@@ 2507-2516 (lines=10) @@
2504
   *
2505
   * @return static <p>(Immutable)</p>
2506
   */
2507
  public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2508
  {
2509
    if (true === $recursive) {
2510
      $result = \array_merge_recursive($this->array, $array);
2511
    } else {
2512
      $result = \array_merge($this->array, $array);
2513
    }
2514
2515
    return static::create($result);
2516
  }
2517
2518
  /**
2519
   * Merge the the current array into the $array.
@@ 2528-2537 (lines=10) @@
2525
   *
2526
   * @return static <p>(Immutable)</p>
2527
   */
2528
  public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2529
  {
2530
    if (true === $recursive) {
2531
      $result = \array_replace_recursive($array, $this->array);
2532
    } else {
2533
      $result = \array_replace($array, $this->array);
2534
    }
2535
2536
    return static::create($result);
2537
  }
2538
2539
  /**
2540
   * Merge the current array into the new $array.
@@ 2550-2559 (lines=10) @@
2547
   *
2548
   * @return static <p>(Immutable)</p>
2549
   */
2550
  public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2551
  {
2552
    if (true === $recursive) {
2553
      $result = \array_merge_recursive($array, $this->array);
2554
    } else {
2555
      $result = \array_merge($array, $this->array);
2556
    }
2557
2558
    return static::create($result);
2559
  }
2560
2561
  /**
2562
   * Get the min value from an array.