Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 505-516 (lines=12) @@
502
   *
503
   * @throws \InvalidArgumentException
504
   */
505
  public function uasort($function)
506
  {
507
    if (!\is_callable($function)) {
508
      throw new \InvalidArgumentException(
509
          'Passed function must be callable'
510
      );
511
    }
512
513
    \uasort($this->array, $function);
514
515
    return $this;
516
  }
517
518
  /**
519
   * Sort the entries by keys using a user-defined comparison function.
@@ 1151-1162 (lines=12) @@
1148
   *
1149
   * @throws \InvalidArgumentException
1150
   */
1151
  public function customSortKeys($function)
1152
  {
1153
    if (!\is_callable($function)) {
1154
      throw new \InvalidArgumentException(
1155
          'Passed function must be callable'
1156
      );
1157
    }
1158
1159
    \uksort($this->array, $function);
1160
1161
    return $this;
1162
  }
1163
1164
  /**
1165
   * Custom sort by value via "usort".
@@ 1175-1186 (lines=12) @@
1172
   *
1173
   * @throws \InvalidArgumentException
1174
   */
1175
  public function customSortValues($function)
1176
  {
1177
    if (!\is_callable($function)) {
1178
      throw new \InvalidArgumentException(
1179
          'Passed function must be callable'
1180
      );
1181
    }
1182
1183
    \usort($this->array, $function);
1184
1185
    return $this;
1186
  }
1187
1188
  /**
1189
   * Return values that are only in the current array.