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.
@@ 850-861 (lines=12) @@
847
   *
848
   * @throws \InvalidArgumentException
849
   */
850
  public function customSortKeys($function)
851
  {
852
    if (!is_callable($function)) {
853
      throw new \InvalidArgumentException(
854
          'Passed function must be callable'
855
      );
856
    }
857
858
    uksort($this->array, $function);
859
860
    return $this;
861
  }
862
863
  /**
864
   * Custom sort by value via "usort".
@@ 874-885 (lines=12) @@
871
   *
872
   * @throws \InvalidArgumentException
873
   */
874
  public function customSortValues($function)
875
  {
876
    if (!is_callable($function)) {
877
      throw new \InvalidArgumentException(
878
          'Passed function must be callable'
879
      );
880
    }
881
882
    usort($this->array, $function);
883
884
    return $this;
885
  }
886
887
  /**
888
   * Return values that are only in the current array.