Code Duplication    Length = 12-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 795-806 (lines=12) @@
792
     *
793
     * @psalm-return static<TKey,T>
794
     */
795
    public function uasort($function): self
796
    {
797
        if (!\is_callable($function)) {
798
            throw new \InvalidArgumentException('Passed function must be callable');
799
        }
800
801
        $this->generatorToArray();
802
803
        \uasort($this->array, $function);
804
805
        return $this;
806
    }
807
808
    /**
809
     * Sort the entries with a user-defined comparison function and maintain key association.
@@ 1702-1713 (lines=12) @@
1699
     *
1700
     * @psalm-return static<TKey,T>
1701
     */
1702
    public function customSortValues($function): self
1703
    {
1704
        if (\is_callable($function) === false) {
1705
            throw new \InvalidArgumentException('Passed function must be callable');
1706
        }
1707
1708
        $this->generatorToArray();
1709
1710
        \usort($this->array, $function);
1711
1712
        return $this;
1713
    }
1714
1715
    /**
1716
     * Custom sort by value via "usort".