Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

@@ 575-588 (lines=14) @@
572
     * @return static
573
     *                <p>(Mutable) Return this Arrayy object.</p>
574
     */
575
    public function uasort($function): self
576
    {
577
        if (!\is_callable($function)) {
578
            throw new \InvalidArgumentException(
579
                'Passed function must be callable'
580
            );
581
        }
582
583
        $this->generatorToArray();
584
585
        \uasort($this->array, $function);
586
587
        return $this;
588
    }
589
590
    /**
591
     * Sort the entries by keys using a user-defined comparison function.
@@ 1220-1233 (lines=14) @@
1217
     * @return static
1218
     *                <p>(Mutable) Return this Arrayy object.</p>
1219
     */
1220
    public function customSortKeys($function): self
1221
    {
1222
        if (!\is_callable($function)) {
1223
            throw new \InvalidArgumentException(
1224
                'Passed function must be callable'
1225
            );
1226
        }
1227
1228
        $this->generatorToArray();
1229
1230
        \uksort($this->array, $function);
1231
1232
        return $this;
1233
    }
1234
1235
    /**
1236
     * Custom sort by value via "usort".
@@ 1247-1260 (lines=14) @@
1244
     * @return static
1245
     *                <p>(Mutable) Return this Arrayy object.</p>
1246
     */
1247
    public function customSortValues($function): self
1248
    {
1249
        if (!\is_callable($function)) {
1250
            throw new \InvalidArgumentException(
1251
                'Passed function must be callable'
1252
            );
1253
        }
1254
1255
        $this->generatorToArray();
1256
1257
        \usort($this->array, $function);
1258
1259
        return $this;
1260
    }
1261
1262
    /**
1263
     * Return values that are only in the current array.