Code Duplication    Length = 12-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 813-824 (lines=12) @@
810
     *
811
     * @psalm-return static<TKey,T>
812
     */
813
    public function uasort($function): self
814
    {
815
        if (!\is_callable($function)) {
816
            throw new \InvalidArgumentException('Passed function must be callable');
817
        }
818
819
        $this->generatorToArray();
820
821
        \uasort($this->array, $function);
822
823
        return $this;
824
    }
825
826
    /**
827
     * Sort the entries with a user-defined comparison function and maintain key association.
@@ 1782-1793 (lines=12) @@
1779
     *
1780
     * @psalm-return static<TKey,T>
1781
     */
1782
    public function customSortValues($function): self
1783
    {
1784
        if (\is_callable($function) === false) {
1785
            throw new \InvalidArgumentException('Passed function must be callable');
1786
        }
1787
1788
        $this->generatorToArray();
1789
1790
        \usort($this->array, $function);
1791
1792
        return $this;
1793
    }
1794
1795
    /**
1796
     * Custom sort by value via "usort".