Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1512-1521 (lines=10) @@
1509
   *
1510
   * @return Arrayy (Immutable)
1511
   */
1512
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1513
  {
1514
    if (true === $recursive) {
1515
      $result = array_replace_recursive($this->array, $array);
1516
    } else {
1517
      $result = array_replace($this->array, $array);
1518
    }
1519
1520
    return static::create($result);
1521
  }
1522
1523
  /**
1524
   * Merge the new $array into the current array.
@@ 1534-1543 (lines=10) @@
1531
   *
1532
   * @return Arrayy (Immutable)
1533
   */
1534
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1535
  {
1536
    if (true === $recursive) {
1537
      $result = array_merge_recursive($this->array, $array);
1538
    } else {
1539
      $result = array_merge($this->array, $array);
1540
    }
1541
1542
    return static::create($result);
1543
  }
1544
1545
  /**
1546
   * Merge the the current array into the $array.
@@ 1555-1564 (lines=10) @@
1552
   *
1553
   * @return Arrayy (Immutable)
1554
   */
1555
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1556
  {
1557
    if (true === $recursive) {
1558
      $result = array_replace_recursive($array, $this->array);
1559
    } else {
1560
      $result = array_replace($array, $this->array);
1561
    }
1562
1563
    return static::create($result);
1564
  }
1565
1566
  /**
1567
   * Merge the current array into the new $array.
@@ 1577-1586 (lines=10) @@
1574
   *
1575
   * @return Arrayy (Immutable)
1576
   */
1577
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1578
  {
1579
    if (true === $recursive) {
1580
      $result = array_merge_recursive($array, $this->array);
1581
    } else {
1582
      $result = array_merge($array, $this->array);
1583
    }
1584
1585
    return static::create($result);
1586
  }
1587
1588
  /**
1589
   * Get the min value from an array.