Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1408-1417 (lines=10) @@
1405
   *
1406
   * @return Arrayy (Immutable)
1407
   */
1408
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1409
  {
1410
    if (true === $recursive) {
1411
      $result = array_replace_recursive($this->array, $array);
1412
    } else {
1413
      $result = array_replace($this->array, $array);
1414
    }
1415
1416
    return static::create($result);
1417
  }
1418
1419
  /**
1420
   * Merge the new $array into the current array.
@@ 1430-1439 (lines=10) @@
1427
   *
1428
   * @return Arrayy (Immutable)
1429
   */
1430
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1431
  {
1432
    if (true === $recursive) {
1433
      $result = array_merge_recursive($this->array, $array);
1434
    } else {
1435
      $result = array_merge($this->array, $array);
1436
    }
1437
1438
    return static::create($result);
1439
  }
1440
1441
  /**
1442
   * Merge the the current array into the $array.
@@ 1451-1460 (lines=10) @@
1448
   *
1449
   * @return Arrayy (Immutable)
1450
   */
1451
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1452
  {
1453
    if (true === $recursive) {
1454
      $result = array_replace_recursive($array, $this->array);
1455
    } else {
1456
      $result = array_replace($array, $this->array);
1457
    }
1458
1459
    return static::create($result);
1460
  }
1461
1462
  /**
1463
   * Merge the current array into the new $array.
@@ 1473-1482 (lines=10) @@
1470
   *
1471
   * @return Arrayy (Immutable)
1472
   */
1473
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1474
  {
1475
    if (true === $recursive) {
1476
      $result = array_merge_recursive($array, $this->array);
1477
    } else {
1478
      $result = array_merge($array, $this->array);
1479
    }
1480
1481
    return static::create($result);
1482
  }
1483
1484
  /**
1485
   * Get the min value from an array.