code: public function getAuthority()
      {
          $authority = $this->host;
  
          if ($this->host !== '' && $this->user !== null) {
              $authority = $this->user . '@' . $authority;
  
              $authority = $authority . ':' . $this->port;
          }
  
          return $authority;
      }
docs: Retrieves the authority component of the URI.
  
  @return string