Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 642-655 (lines=14) @@
639
     * @return static
640
     *                <p>(Mutable) Return this Arrayy object.</p>
641
     */
642
    public function uasort($function): self
643
    {
644
        if (!\is_callable($function)) {
645
            throw new \InvalidArgumentException('Passed function must be callable');
646
        }
647
648
        $this->generatorToArray();
649
650
        \uasort($this->array, $function);
651
652
        return $this;
653
    }
654
655
    /**
656
     * Sort the entries by keys using a user-defined comparison function.
657
     *
658
     * @param callable $function
@@ 1381-1394 (lines=14) @@
1378
     * @return static
1379
     *                <p>(Mutable) Return this Arrayy object.</p>
1380
     */
1381
    public function customSortValues($function): self
1382
    {
1383
        if (\is_callable($function) === false) {
1384
            throw new \InvalidArgumentException('Passed function must be callable');
1385
        }
1386
1387
        $this->generatorToArray();
1388
1389
        \usort($this->array, $function);
1390
1391
        return $this;
1392
    }
1393
1394
    /**
1395
     * Delete the given key or keys.
1396
     *
1397
     * @param int|int[]|string|string[] $keyOrKeys