src/Collection/ImmArray.php
protected function arraySort(callable $cb = null)
    {
        $ar = $this->toArray();
        if ($cb) {
            usort($ar, $cb);
        } else {
            sort($ar);
        }
        return static::fromArray($ar);
    }
protected function arraySort(callable $cb = null)
    {
        $ar = $this->toArray();
        if ($cb) {
            usort($ar, $cb);
        } else {
            sort($ar);
        }
        return static::fromArray($ar);
    }
protected function arraySort ( callable $ cb = null ) { $ ar = $ this -> toArray ( ) ; if ( $ cb ) { usort ( $ ar , $ cb ) ; } else { sort ( $ ar ) ; } return static :: fromArray ( $ ar ) ; }
Fallback behaviour to use the builtin array sort functions

@param callable $cb The callback for comparison
@return static
Fallback behaviour to use the builtin array sort functions