function sortCustomKey(callable $closure) {
        $data = $this->data;
        \uksort($data, $closure);
        
        return (new self($data));
    }
function sortCustomKey(callable $closure) {
        $data = $this->data;
        \uksort($data, $closure);
        
        return (new self($data));
    }
function sortCustomKey ( callable $ closure ) { $ data = $ this -> data ; \ uksort ( $ data , $ closure ) ; return ( new self ( $ data ) ) ; }
Sorts the collection by key using a custom sorting function. Returns a new Collection.
@param callable  $closure  Callback specification: `function ($a, $b): int`
@return \CharlotteDunois\Collect\Collection
Sorts the collection by key using a custom sorting function . Returns a new Collection .