Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

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