public function display(): string
    {
        $output = sprintf('%s:', $this->scheme);
        if ($this->authority !== null) {
            $output .= sprintf('//%s', $this->host);
            if ($this->port !== null) {
                $output .= sprintf(':%d', $this->port);
            }
        }
        $output .= $this->path;
        if ($this->query !== null) {
            $output .= sprintf('?%s', $this->query);
        }
        if ($this->fragment !== null) {
            $output .= sprintf('#%s', $this->fragment);
        }

        return $output;
    }