Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2445-2454 (lines=10) @@
2442
   *
2443
   * @return static <p>(Immutable)</p>
2444
   */
2445
  public function mergeAppendKeepIndex(array $array = [], bool $recursive = false)
2446
  {
2447
    if (true === $recursive) {
2448
      $result = \array_replace_recursive($this->array, $array);
2449
    } else {
2450
      $result = \array_replace($this->array, $array);
2451
    }
2452
2453
    return static::create($result);
2454
  }
2455
2456
  /**
2457
   * Merge the new $array into the current array.
@@ 2467-2476 (lines=10) @@
2464
   *
2465
   * @return static <p>(Immutable)</p>
2466
   */
2467
  public function mergeAppendNewIndex(array $array = [], bool $recursive = false)
2468
  {
2469
    if (true === $recursive) {
2470
      $result = \array_merge_recursive($this->array, $array);
2471
    } else {
2472
      $result = \array_merge($this->array, $array);
2473
    }
2474
2475
    return static::create($result);
2476
  }
2477
2478
  /**
2479
   * Merge the the current array into the $array.
@@ 2488-2497 (lines=10) @@
2485
   *
2486
   * @return static <p>(Immutable)</p>
2487
   */
2488
  public function mergePrependKeepIndex(array $array = [], bool $recursive = false)
2489
  {
2490
    if (true === $recursive) {
2491
      $result = \array_replace_recursive($array, $this->array);
2492
    } else {
2493
      $result = \array_replace($array, $this->array);
2494
    }
2495
2496
    return static::create($result);
2497
  }
2498
2499
  /**
2500
   * Merge the current array into the new $array.
@@ 2510-2519 (lines=10) @@
2507
   *
2508
   * @return static <p>(Immutable)</p>
2509
   */
2510
  public function mergePrependNewIndex(array $array = [], bool $recursive = false)
2511
  {
2512
    if (true === $recursive) {
2513
      $result = \array_merge_recursive($array, $this->array);
2514
    } else {
2515
      $result = \array_merge($array, $this->array);
2516
    }
2517
2518
    return static::create($result);
2519
  }
2520
2521
  /**
2522
   * Get the min value from an array.