Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 506-517 (lines=12) @@
503
   *
504
   * @throws \InvalidArgumentException
505
   */
506
  public function uasort($function)
507
  {
508
    if (!\is_callable($function)) {
509
      throw new \InvalidArgumentException(
510
          'Passed function must be callable'
511
      );
512
    }
513
514
    \uasort($this->array, $function);
515
516
    return $this;
517
  }
518
519
  /**
520
   * Sort the entries by keys using a user-defined comparison function.
@@ 1119-1130 (lines=12) @@
1116
   *
1117
   * @throws \InvalidArgumentException
1118
   */
1119
  public function customSortKeys($function)
1120
  {
1121
    if (!\is_callable($function)) {
1122
      throw new \InvalidArgumentException(
1123
          'Passed function must be callable'
1124
      );
1125
    }
1126
1127
    \uksort($this->array, $function);
1128
1129
    return $this;
1130
  }
1131
1132
  /**
1133
   * Custom sort by value via "usort".
@@ 1143-1154 (lines=12) @@
1140
   *
1141
   * @throws \InvalidArgumentException
1142
   */
1143
  public function customSortValues($function)
1144
  {
1145
    if (!\is_callable($function)) {
1146
      throw new \InvalidArgumentException(
1147
          'Passed function must be callable'
1148
      );
1149
    }
1150
1151
    \usort($this->array, $function);
1152
1153
    return $this;
1154
  }
1155
1156
  /**
1157
   * Return values that are only in the current array.