Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 452-463 (lines=12) @@
449
   *
450
   * @throws \InvalidArgumentException
451
   */
452
  public function uasort($function)
453
  {
454
    if (!is_callable($function)) {
455
      throw new \InvalidArgumentException(
456
          'Passed function must be callable'
457
      );
458
    }
459
460
    uasort($this->array, $function);
461
462
    return $this;
463
  }
464
465
  /**
466
   * Sort the entries by keys using a user-defined comparison function.
@@ 881-892 (lines=12) @@
878
   *
879
   * @throws \InvalidArgumentException
880
   */
881
  public function customSortKeys($function)
882
  {
883
    if (!is_callable($function)) {
884
      throw new \InvalidArgumentException(
885
          'Passed function must be callable'
886
      );
887
    }
888
889
    uksort($this->array, $function);
890
891
    return $this;
892
  }
893
894
  /**
895
   * Custom sort by value via "usort".
@@ 905-916 (lines=12) @@
902
   *
903
   * @throws \InvalidArgumentException
904
   */
905
  public function customSortValues($function)
906
  {
907
    if (!is_callable($function)) {
908
      throw new \InvalidArgumentException(
909
          'Passed function must be callable'
910
      );
911
    }
912
913
    usort($this->array, $function);
914
915
    return $this;
916
  }
917
918
  /**
919
   * Return values that are only in the current array.