public function sortByKey(callable $callback = null)
    {
        $items = $this->items;

        $callback
            ? uksort($items, $callback)
            : ksort($items);

        return new static($items);
    }
public function sortByKey(callable $callback = null)
    {
        $items = $this->items;

        $callback
            ? uksort($items, $callback)
            : ksort($items);

        return new static($items);
    }
public function sortByKey ( callable $ callback = null ) { $ items = $ this -> items ; $ callback ? uksort ( $ items , $ callback ) : ksort ( $ items ) ; return new static ( $ items ) ; }
Sort the collection of item keys through a user-defined
comparison function.

@param callable|null $callable

@return static
Sort the collection of item keys through a user - defined comparison function .