Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

@@ 605-618 (lines=14) @@
602
     * @return static
603
     *                <p>(Mutable) Return this Arrayy object.</p>
604
     */
605
    public function uasort($function): self
606
    {
607
        if (!\is_callable($function)) {
608
            throw new \InvalidArgumentException(
609
                'Passed function must be callable'
610
            );
611
        }
612
613
        $this->generatorToArray();
614
615
        \uasort($this->array, $function);
616
617
        return $this;
618
    }
619
620
    /**
621
     * Sort the entries by keys using a user-defined comparison function.
@@ 1293-1306 (lines=14) @@
1290
     * @return static
1291
     *                <p>(Mutable) Return this Arrayy object.</p>
1292
     */
1293
    public function customSortKeys($function): self
1294
    {
1295
        if (!\is_callable($function)) {
1296
            throw new \InvalidArgumentException(
1297
                'Passed function must be callable'
1298
            );
1299
        }
1300
1301
        $this->generatorToArray();
1302
1303
        \uksort($this->array, $function);
1304
1305
        return $this;
1306
    }
1307
1308
    /**
1309
     * Custom sort by value via "usort".
@@ 1320-1333 (lines=14) @@
1317
     * @return static
1318
     *                <p>(Mutable) Return this Arrayy object.</p>
1319
     */
1320
    public function customSortValues($function): self
1321
    {
1322
        if (!\is_callable($function)) {
1323
            throw new \InvalidArgumentException(
1324
                'Passed function must be callable'
1325
            );
1326
        }
1327
1328
        $this->generatorToArray();
1329
1330
        \usort($this->array, $function);
1331
1332
        return $this;
1333
    }
1334
1335
    /**
1336
     * Return values that are only in the current array.