Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1999-2008 (lines=10) @@
1996
   *
1997
   * @return static <p>(Immutable)</p>
1998
   */
1999
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
2000
  {
2001
    if (true === $recursive) {
2002
      $result = \array_replace_recursive($this->array, $array);
2003
    } else {
2004
      $result = \array_replace($this->array, $array);
2005
    }
2006
2007
    return static::create($result);
2008
  }
2009
2010
  /**
2011
   * Merge the new $array into the current array.
@@ 2021-2030 (lines=10) @@
2018
   *
2019
   * @return static <p>(Immutable)</p>
2020
   */
2021
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
2022
  {
2023
    if (true === $recursive) {
2024
      $result = \array_merge_recursive($this->array, $array);
2025
    } else {
2026
      $result = \array_merge($this->array, $array);
2027
    }
2028
2029
    return static::create($result);
2030
  }
2031
2032
  /**
2033
   * Merge the the current array into the $array.
@@ 2042-2051 (lines=10) @@
2039
   *
2040
   * @return static <p>(Immutable)</p>
2041
   */
2042
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
2043
  {
2044
    if (true === $recursive) {
2045
      $result = \array_replace_recursive($array, $this->array);
2046
    } else {
2047
      $result = \array_replace($array, $this->array);
2048
    }
2049
2050
    return static::create($result);
2051
  }
2052
2053
  /**
2054
   * Merge the current array into the new $array.
@@ 2064-2073 (lines=10) @@
2061
   *
2062
   * @return static <p>(Immutable)</p>
2063
   */
2064
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
2065
  {
2066
    if (true === $recursive) {
2067
      $result = \array_merge_recursive($array, $this->array);
2068
    } else {
2069
      $result = \array_merge($array, $this->array);
2070
    }
2071
2072
    return static::create($result);
2073
  }
2074
2075
  /**
2076
   * Get the min value from an array.