Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 443-454 (lines=12) @@
440
   *
441
   * @throws \InvalidArgumentException
442
   */
443
  public function uasort($function)
444
  {
445
    if (!\is_callable($function)) {
446
      throw new \InvalidArgumentException(
447
          'Passed function must be callable'
448
      );
449
    }
450
451
    \uasort($this->array, $function);
452
453
    return $this;
454
  }
455
456
  /**
457
   * Sort the entries by keys using a user-defined comparison function.
@@ 1035-1046 (lines=12) @@
1032
   *
1033
   * @throws \InvalidArgumentException
1034
   */
1035
  public function customSortKeys($function)
1036
  {
1037
    if (!\is_callable($function)) {
1038
      throw new \InvalidArgumentException(
1039
          'Passed function must be callable'
1040
      );
1041
    }
1042
1043
    \uksort($this->array, $function);
1044
1045
    return $this;
1046
  }
1047
1048
  /**
1049
   * Custom sort by value via "usort".
@@ 1059-1070 (lines=12) @@
1056
   *
1057
   * @throws \InvalidArgumentException
1058
   */
1059
  public function customSortValues($function)
1060
  {
1061
    if (!\is_callable($function)) {
1062
      throw new \InvalidArgumentException(
1063
          'Passed function must be callable'
1064
      );
1065
    }
1066
1067
    \usort($this->array, $function);
1068
1069
    return $this;
1070
  }
1071
1072
  /**
1073
   * Return values that are only in the current array.