Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1344-1353 (lines=10) @@
1341
   *
1342
   * @return Arrayy
1343
   */
1344
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1345
  {
1346
    if (true === $recursive) {
1347
      $result = array_replace_recursive($this->array, $array);
1348
    } else {
1349
      $result = array_replace($this->array, $array);
1350
    }
1351
1352
    return static::create($result);
1353
  }
1354
1355
  /**
1356
   * Merge the new $array into the current array.
@@ 1366-1375 (lines=10) @@
1363
   *
1364
   * @return Arrayy
1365
   */
1366
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1367
  {
1368
    if (true === $recursive) {
1369
      $result = array_merge_recursive($this->array, $array);
1370
    } else {
1371
      $result = array_merge($this->array, $array);
1372
    }
1373
1374
    return static::create($result);
1375
  }
1376
1377
  /**
1378
   * Merge the the current array into the $array.
@@ 1387-1396 (lines=10) @@
1384
   *
1385
   * @return Arrayy
1386
   */
1387
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1388
  {
1389
    if (true === $recursive) {
1390
      $result = array_replace_recursive($array, $this->array);
1391
    } else {
1392
      $result = array_replace($array, $this->array);
1393
    }
1394
1395
    return static::create($result);
1396
  }
1397
1398
  /**
1399
   * Merge the current array into the new $array.
@@ 1409-1418 (lines=10) @@
1406
   *
1407
   * @return Arrayy
1408
   */
1409
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1410
  {
1411
    if (true === $recursive) {
1412
      $result = array_merge_recursive($array, $this->array);
1413
    } else {
1414
      $result = array_merge($array, $this->array);
1415
    }
1416
1417
    return static::create($result);
1418
  }
1419
1420
  /**
1421
   * Get the min value from an array.