public function getHostPort(): string
    {
        $host = $this->getHost();

        if ($host && $port = $this->getPort()) {
            $host .= ':' . $port;
        }

        return $host;
    }