Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 547-558 (lines=12) @@
544
     * @return static
545
     *                <p>(Mutable) Return this Arrayy object.</p>
546
     */
547
    public function uasort($function): self
548
    {
549
        if (!\is_callable($function)) {
550
            throw new \InvalidArgumentException(
551
                'Passed function must be callable'
552
            );
553
        }
554
555
        \uasort($this->array, $function);
556
557
        return $this;
558
    }
559
560
    /**
561
     * Sort the entries by keys using a user-defined comparison function.
@@ 1185-1196 (lines=12) @@
1182
     * @return static
1183
     *                <p>(Mutable) Return this Arrayy object.</p>
1184
     */
1185
    public function customSortKeys($function): self
1186
    {
1187
        if (!\is_callable($function)) {
1188
            throw new \InvalidArgumentException(
1189
                'Passed function must be callable'
1190
            );
1191
        }
1192
1193
        \uksort($this->array, $function);
1194
1195
        return $this;
1196
    }
1197
1198
    /**
1199
     * Custom sort by value via "usort".
@@ 1210-1221 (lines=12) @@
1207
     * @return static
1208
     *                <p>(Mutable) Return this Arrayy object.</p>
1209
     */
1210
    public function customSortValues($function): self
1211
    {
1212
        if (!\is_callable($function)) {
1213
            throw new \InvalidArgumentException(
1214
                'Passed function must be callable'
1215
            );
1216
        }
1217
1218
        \usort($this->array, $function);
1219
1220
        return $this;
1221
    }
1222
1223
    /**
1224
     * Return values that are only in the current array.