Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1657-1666 (lines=10) @@
1654
   *
1655
   * @return Arrayy (Immutable)
1656
   */
1657
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1658
  {
1659
    if (true === $recursive) {
1660
      $result = array_replace_recursive($this->array, $array);
1661
    } else {
1662
      $result = array_replace($this->array, $array);
1663
    }
1664
1665
    return static::create($result);
1666
  }
1667
1668
  /**
1669
   * Merge the new $array into the current array.
@@ 1679-1688 (lines=10) @@
1676
   *
1677
   * @return Arrayy (Immutable)
1678
   */
1679
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1680
  {
1681
    if (true === $recursive) {
1682
      $result = array_merge_recursive($this->array, $array);
1683
    } else {
1684
      $result = array_merge($this->array, $array);
1685
    }
1686
1687
    return static::create($result);
1688
  }
1689
1690
  /**
1691
   * Merge the the current array into the $array.
@@ 1700-1709 (lines=10) @@
1697
   *
1698
   * @return Arrayy (Immutable)
1699
   */
1700
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1701
  {
1702
    if (true === $recursive) {
1703
      $result = array_replace_recursive($array, $this->array);
1704
    } else {
1705
      $result = array_replace($array, $this->array);
1706
    }
1707
1708
    return static::create($result);
1709
  }
1710
1711
  /**
1712
   * Merge the current array into the new $array.
@@ 1722-1731 (lines=10) @@
1719
   *
1720
   * @return Arrayy (Immutable)
1721
   */
1722
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1723
  {
1724
    if (true === $recursive) {
1725
      $result = array_merge_recursive($array, $this->array);
1726
    } else {
1727
      $result = array_merge($array, $this->array);
1728
    }
1729
1730
    return static::create($result);
1731
  }
1732
1733
  /**
1734
   * Get the min value from an array.