Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1707-1716 (lines=10) @@
1704
   *
1705
   * @return Arrayy (Immutable)
1706
   */
1707
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1708
  {
1709
    if (true === $recursive) {
1710
      $result = array_replace_recursive($this->array, $array);
1711
    } else {
1712
      $result = array_replace($this->array, $array);
1713
    }
1714
1715
    return static::create($result);
1716
  }
1717
1718
  /**
1719
   * Merge the new $array into the current array.
@@ 1729-1738 (lines=10) @@
1726
   *
1727
   * @return Arrayy (Immutable)
1728
   */
1729
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1730
  {
1731
    if (true === $recursive) {
1732
      $result = array_merge_recursive($this->array, $array);
1733
    } else {
1734
      $result = array_merge($this->array, $array);
1735
    }
1736
1737
    return static::create($result);
1738
  }
1739
1740
  /**
1741
   * Merge the the current array into the $array.
@@ 1750-1759 (lines=10) @@
1747
   *
1748
   * @return Arrayy (Immutable)
1749
   */
1750
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1751
  {
1752
    if (true === $recursive) {
1753
      $result = array_replace_recursive($array, $this->array);
1754
    } else {
1755
      $result = array_replace($array, $this->array);
1756
    }
1757
1758
    return static::create($result);
1759
  }
1760
1761
  /**
1762
   * Merge the current array into the new $array.
@@ 1772-1781 (lines=10) @@
1769
   *
1770
   * @return Arrayy (Immutable)
1771
   */
1772
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1773
  {
1774
    if (true === $recursive) {
1775
      $result = array_merge_recursive($array, $this->array);
1776
    } else {
1777
      $result = array_merge($array, $this->array);
1778
    }
1779
1780
    return static::create($result);
1781
  }
1782
1783
  /**
1784
   * Get the min value from an array.