src/Http/Uri.php
public function getAuthority()
    {
        $user_info = $this->getUserInfo();
        $host = $this->getHost();
        $port = $this->getPort();

        return sprintf(
            '%s%s%s',
            $user_info ? ($user_info.'@') : '',
            $host,
            $port !== null ? (':'.$port) : ''
        );
    }
public function getAuthority()
    {
        $user_info = $this->getUserInfo();
        $host = $this->getHost();
        $port = $this->getPort();

        return sprintf(
            '%s%s%s',
            $user_info ? ($user_info.'@') : '',
            $host,
            $port !== null ? (':'.$port) : ''
        );
    }
Retrieve the authority component of the URI.
If no authority information is present, this method MUST return an empty
string.
The authority syntax of the URI is:
<pre>
[user-info@]host[:port]
</pre>
If the port component is not set or is the standard port for the current
scheme, it SHOULD NOT be included.

@see https://tools.ietf.org/html/rfc3986#section-3.2
@return string The URI authority, in "[user-info@]host[:port]" format.