Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 1179-1188 (lines=10) @@
1176
   *
1177
   * @return Arrayy
1178
   */
1179
  public function mergeAppendKeepIndex(array $array = array(), $recursive = false)
1180
  {
1181
    if (true === $recursive) {
1182
      $result = array_replace_recursive($this->array, $array);
1183
    } else {
1184
      $result = array_replace($this->array, $array);
1185
    }
1186
1187
    return static::create($result);
1188
  }
1189
1190
  /**
1191
   * alias: for "Arrayy->searchIndex()"
@@ 1331-1340 (lines=10) @@
1328
   *
1329
   * @return Arrayy
1330
   */
1331
  public function mergeAppendNewIndex(array $array = array(), $recursive = false)
1332
  {
1333
    if (true === $recursive) {
1334
      $result = array_merge_recursive($this->array, $array);
1335
    } else {
1336
      $result = array_merge($this->array, $array);
1337
    }
1338
1339
    return static::create($result);
1340
  }
1341
1342
  /**
1343
   * Merge the current array into the new $array.
@@ 1353-1362 (lines=10) @@
1350
   *
1351
   * @return Arrayy
1352
   */
1353
  public function mergePrependNewIndex(array $array = array(), $recursive = false)
1354
  {
1355
    if (true === $recursive) {
1356
      $result = array_merge_recursive($array, $this->array);
1357
    } else {
1358
      $result = array_merge($array, $this->array);
1359
    }
1360
1361
    return static::create($result);
1362
  }
1363
1364
  /**
1365
   * Merge the the current array into the $array.
@@ 1374-1383 (lines=10) @@
1371
   *
1372
   * @return Arrayy
1373
   */
1374
  public function mergePrependKeepIndex(array $array = array(), $recursive = false)
1375
  {
1376
    if (true === $recursive) {
1377
      $result = array_replace_recursive($array, $this->array);
1378
    } else {
1379
      $result = array_replace($array, $this->array);
1380
    }
1381
1382
    return static::create($result);
1383
  }
1384
1385
  /**
1386
   * Return values that are only in the current array.