Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

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