Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1188-1197 (lines=10) @@
1185
   *
1186
   * @return Arrayy
1187
   */
1188
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1189
  {
1190
    if (true === $recursive) {
1191
      $result = array_replace_recursive($this->array, $array);
1192
    } else {
1193
      $result = array_replace($this->array, $array);
1194
    }
1195
1196
    return static::create($result);
1197
  }
1198
1199
  /**
1200
   * alias: for "Arrayy->searchIndex()"
@@ 1363-1372 (lines=10) @@
1360
   *
1361
   * @return Arrayy
1362
   */
1363
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1364
  {
1365
    if (true === $recursive) {
1366
      $result = array_merge_recursive($this->array, $array);
1367
    } else {
1368
      $result = array_merge($this->array, $array);
1369
    }
1370
1371
    return static::create($result);
1372
  }
1373
1374
  /**
1375
   * Merge the current array into the new $array.
@@ 1385-1394 (lines=10) @@
1382
   *
1383
   * @return Arrayy
1384
   */
1385
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1386
  {
1387
    if (true === $recursive) {
1388
      $result = array_merge_recursive($array, $this->array);
1389
    } else {
1390
      $result = array_merge($array, $this->array);
1391
    }
1392
1393
    return static::create($result);
1394
  }
1395
1396
  /**
1397
   * Merge the the current array into the $array.
@@ 1406-1415 (lines=10) @@
1403
   *
1404
   * @return Arrayy
1405
   */
1406
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1407
  {
1408
    if (true === $recursive) {
1409
      $result = array_replace_recursive($array, $this->array);
1410
    } else {
1411
      $result = array_replace($array, $this->array);
1412
    }
1413
1414
    return static::create($result);
1415
  }
1416
1417
  /**
1418
   * Return values that are only in the current array.