Code Duplication    Length = 12-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 800-811 (lines=12) @@
797
     *
798
     * @psalm-return static<TKey,T>
799
     */
800
    public function uasort($function): self
801
    {
802
        if (!\is_callable($function)) {
803
            throw new \InvalidArgumentException('Passed function must be callable');
804
        }
805
806
        $this->generatorToArray();
807
808
        \uasort($this->array, $function);
809
810
        return $this;
811
    }
812
813
    /**
814
     * Sort the entries with a user-defined comparison function and maintain key association.
@@ 1769-1780 (lines=12) @@
1766
     *
1767
     * @psalm-return static<TKey,T>
1768
     */
1769
    public function customSortValues($function): self
1770
    {
1771
        if (\is_callable($function) === false) {
1772
            throw new \InvalidArgumentException('Passed function must be callable');
1773
        }
1774
1775
        $this->generatorToArray();
1776
1777
        \usort($this->array, $function);
1778
1779
        return $this;
1780
    }
1781
1782
    /**
1783
     * Custom sort by value via "usort".