function sortKey(bool $descending = false, int $options = \SORT_REGULAR) {
        $data = $this->data;
        
        if($descending) {
            \krsort($data, $options);
        } else {
            \ksort($data, $options);
        }
        
        return (new self($data));
    }
function sortKey(bool $descending = false, int $options = \SORT_REGULAR) {
        $data = $this->data;
        
        if($descending) {
            \krsort($data, $options);
        } else {
            \ksort($data, $options);
        }
        
        return (new self($data));
    }
function sortKey ( bool $ descending = false , int $ options = \ SORT_REGULAR ) { $ data = $ this -> data ; if ( $ descending ) { \ krsort ( $ data , $ options ) ; } else { \ ksort ( $ data , $ options ) ; } return ( new self ( $ data ) ) ; }
Sorts the collection by key, using sort behaviour flags. Returns a new Collection.
@param bool  $descending
@param int   $options
@return \CharlotteDunois\Collect\Collection
Sorts the collection by key using sort behaviour flags . Returns a new Collection .