Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2441-2450 (lines=10) @@
2438
   *
2439
   * @return static <p>(Immutable)</p>
2440
   */
2441
  public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2442
  {
2443
    if (true === $recursive) {
2444
      $result = \array_replace_recursive($this->array, $array);
2445
    } else {
2446
      $result = \array_replace($this->array, $array);
2447
    }
2448
2449
    return static::create($result);
2450
  }
2451
2452
  /**
2453
   * Merge the new $array into the current array.
@@ 2463-2472 (lines=10) @@
2460
   *
2461
   * @return static <p>(Immutable)</p>
2462
   */
2463
  public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2464
  {
2465
    if (true === $recursive) {
2466
      $result = \array_merge_recursive($this->array, $array);
2467
    } else {
2468
      $result = \array_merge($this->array, $array);
2469
    }
2470
2471
    return static::create($result);
2472
  }
2473
2474
  /**
2475
   * Merge the the current array into the $array.
@@ 2484-2493 (lines=10) @@
2481
   *
2482
   * @return static <p>(Immutable)</p>
2483
   */
2484
  public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2485
  {
2486
    if (true === $recursive) {
2487
      $result = \array_replace_recursive($array, $this->array);
2488
    } else {
2489
      $result = \array_replace($array, $this->array);
2490
    }
2491
2492
    return static::create($result);
2493
  }
2494
2495
  /**
2496
   * Merge the current array into the new $array.
@@ 2506-2515 (lines=10) @@
2503
   *
2504
   * @return static <p>(Immutable)</p>
2505
   */
2506
  public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2507
  {
2508
    if (true === $recursive) {
2509
      $result = \array_merge_recursive($array, $this->array);
2510
    } else {
2511
      $result = \array_merge($array, $this->array);
2512
    }
2513
2514
    return static::create($result);
2515
  }
2516
2517
  /**
2518
   * Get the min value from an array.