Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 451-462 (lines=12) @@
448
   *
449
   * @throws \InvalidArgumentException
450
   */
451
  public function uasort($function)
452
  {
453
    if (!is_callable($function)) {
454
      throw new \InvalidArgumentException(
455
          'Passed function must be callable'
456
      );
457
    }
458
459
    uasort($this->array, $function);
460
461
    return $this;
462
  }
463
464
  /**
465
   * Sort the entries by keys using a user-defined comparison function.
@@ 849-860 (lines=12) @@
846
   *
847
   * @throws \InvalidArgumentException
848
   */
849
  public function customSortKeys($function)
850
  {
851
    if (!is_callable($function)) {
852
      throw new \InvalidArgumentException(
853
          'Passed function must be callable'
854
      );
855
    }
856
857
    uksort($this->array, $function);
858
859
    return $this;
860
  }
861
862
  /**
863
   * Custom sort by value via "usort".
@@ 873-884 (lines=12) @@
870
   *
871
   * @throws \InvalidArgumentException
872
   */
873
  public function customSortValues($function)
874
  {
875
    if (!is_callable($function)) {
876
      throw new \InvalidArgumentException(
877
          'Passed function must be callable'
878
      );
879
    }
880
881
    usort($this->array, $function);
882
883
    return $this;
884
  }
885
886
  /**
887
   * Return values that are only in the current array.