Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1391-1400 (lines=10) @@
1388
   *
1389
   * @return Arrayy (Immutable)
1390
   */
1391
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1392
  {
1393
    if (true === $recursive) {
1394
      $result = array_replace_recursive($this->array, $array);
1395
    } else {
1396
      $result = array_replace($this->array, $array);
1397
    }
1398
1399
    return static::create($result);
1400
  }
1401
1402
  /**
1403
   * Merge the new $array into the current array.
@@ 1413-1422 (lines=10) @@
1410
   *
1411
   * @return Arrayy (Immutable)
1412
   */
1413
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1414
  {
1415
    if (true === $recursive) {
1416
      $result = array_merge_recursive($this->array, $array);
1417
    } else {
1418
      $result = array_merge($this->array, $array);
1419
    }
1420
1421
    return static::create($result);
1422
  }
1423
1424
  /**
1425
   * Merge the the current array into the $array.
@@ 1434-1443 (lines=10) @@
1431
   *
1432
   * @return Arrayy (Immutable)
1433
   */
1434
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1435
  {
1436
    if (true === $recursive) {
1437
      $result = array_replace_recursive($array, $this->array);
1438
    } else {
1439
      $result = array_replace($array, $this->array);
1440
    }
1441
1442
    return static::create($result);
1443
  }
1444
1445
  /**
1446
   * Merge the current array into the new $array.
@@ 1456-1465 (lines=10) @@
1453
   *
1454
   * @return Arrayy (Immutable)
1455
   */
1456
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1457
  {
1458
    if (true === $recursive) {
1459
      $result = array_merge_recursive($array, $this->array);
1460
    } else {
1461
      $result = array_merge($array, $this->array);
1462
    }
1463
1464
    return static::create($result);
1465
  }
1466
1467
  /**
1468
   * Get the min value from an array.