Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1752-1761 (lines=10) @@
1749
   *
1750
   * @return static (Immutable)
1751
   */
1752
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1753
  {
1754
    if (true === $recursive) {
1755
      $result = array_replace_recursive($this->array, $array);
1756
    } else {
1757
      $result = array_replace($this->array, $array);
1758
    }
1759
1760
    return static::create($result);
1761
  }
1762
1763
  /**
1764
   * Merge the new $array into the current array.
@@ 1774-1783 (lines=10) @@
1771
   *
1772
   * @return static (Immutable)
1773
   */
1774
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1775
  {
1776
    if (true === $recursive) {
1777
      $result = array_merge_recursive($this->array, $array);
1778
    } else {
1779
      $result = array_merge($this->array, $array);
1780
    }
1781
1782
    return static::create($result);
1783
  }
1784
1785
  /**
1786
   * Merge the the current array into the $array.
@@ 1795-1804 (lines=10) @@
1792
   *
1793
   * @return static (Immutable)
1794
   */
1795
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1796
  {
1797
    if (true === $recursive) {
1798
      $result = array_replace_recursive($array, $this->array);
1799
    } else {
1800
      $result = array_replace($array, $this->array);
1801
    }
1802
1803
    return static::create($result);
1804
  }
1805
1806
  /**
1807
   * Merge the current array into the new $array.
@@ 1817-1826 (lines=10) @@
1814
   *
1815
   * @return static (Immutable)
1816
   */
1817
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1818
  {
1819
    if (true === $recursive) {
1820
      $result = array_merge_recursive($array, $this->array);
1821
    } else {
1822
      $result = array_merge($array, $this->array);
1823
    }
1824
1825
    return static::create($result);
1826
  }
1827
1828
  /**
1829
   * Get the min value from an array.