src/Http/Uri.php
public function getAuthority()
    {
        $authority = $this->host;

        if ($this->host !== '' && $this->user !== null) {
            $authority = $this->user . '@' . $authority;

            $authority = $authority . ':' . $this->port;
        }

        return $authority;
    }
public function getAuthority()
    {
        $authority = $this->host;

        if ($this->host !== '' && $this->user !== null) {
            $authority = $this->user . '@' . $authority;

            $authority = $authority . ':' . $this->port;
        }

        return $authority;
    }
Retrieves the authority component of the URI.

@return string