Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 465-476 (lines=12) @@
462
   *
463
   * @throws \InvalidArgumentException
464
   */
465
  public function uasort($function)
466
  {
467
    if (!\is_callable($function)) {
468
      throw new \InvalidArgumentException(
469
          'Passed function must be callable'
470
      );
471
    }
472
473
    \uasort($this->array, $function);
474
475
    return $this;
476
  }
477
478
  /**
479
   * Sort the entries by keys using a user-defined comparison function.
@@ 1078-1089 (lines=12) @@
1075
   *
1076
   * @throws \InvalidArgumentException
1077
   */
1078
  public function customSortKeys($function)
1079
  {
1080
    if (!\is_callable($function)) {
1081
      throw new \InvalidArgumentException(
1082
          'Passed function must be callable'
1083
      );
1084
    }
1085
1086
    \uksort($this->array, $function);
1087
1088
    return $this;
1089
  }
1090
1091
  /**
1092
   * Custom sort by value via "usort".
@@ 1102-1113 (lines=12) @@
1099
   *
1100
   * @throws \InvalidArgumentException
1101
   */
1102
  public function customSortValues($function)
1103
  {
1104
    if (!\is_callable($function)) {
1105
      throw new \InvalidArgumentException(
1106
          'Passed function must be callable'
1107
      );
1108
    }
1109
1110
    \usort($this->array, $function);
1111
1112
    return $this;
1113
  }
1114
1115
  /**
1116
   * Return values that are only in the current array.