Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 519-530 (lines=12) @@
516
   *
517
   * @throws \InvalidArgumentException
518
   */
519
  public function uasort($function)
520
  {
521
    if (!\is_callable($function)) {
522
      throw new \InvalidArgumentException(
523
        'Passed function must be callable'
524
      );
525
    }
526
527
    \uasort($this->array, $function);
528
529
    return $this;
530
  }
531
532
  /**
533
   * Sort the entries by keys using a user-defined comparison function.
@@ 1238-1249 (lines=12) @@
1235
   *
1236
   * @throws \InvalidArgumentException
1237
   */
1238
  public function customSortKeys($function)
1239
  {
1240
    if (!\is_callable($function)) {
1241
      throw new \InvalidArgumentException(
1242
        'Passed function must be callable'
1243
      );
1244
    }
1245
1246
    \uksort($this->array, $function);
1247
1248
    return $this;
1249
  }
1250
1251
  /**
1252
   * Custom sort by value via "usort".
@@ 1262-1273 (lines=12) @@
1259
   *
1260
   * @throws \InvalidArgumentException
1261
   */
1262
  public function customSortValues($function)
1263
  {
1264
    if (!\is_callable($function)) {
1265
      throw new \InvalidArgumentException(
1266
        'Passed function must be callable'
1267
      );
1268
    }
1269
1270
    \usort($this->array, $function);
1271
1272
    return $this;
1273
  }
1274
1275
  /**
1276
   * Return values that are only in the current array.