original_string: public function getBaseUrl()
      {
          $url = '';
          if (isset($this->scheme)) {
              if ('' !== $this->scheme) {
                  $url .= $this->scheme . ':';
              }
              $url .= '//';
          }
  
          if (isset($this->user)) {
              $url .= $this->user;
  
              if (isset($this->pass)) {
                  $url .= ':' . $this->pass;
              }
  
              $url .= '@';
          }
  
          $url .= $this->host;
  
          if (isset($this->port)) {
              $url .= ':' . $this->port;
          }
  
          if (isset($this->path)) {
              if ($url != '' && $this->path[0] !== '/') {
                  $url .= '/';
              }
  
              $url .= $this->path;
          }
  
          return $url;
      }
code: public function getBaseUrl()
      {
          $url = '';
          if (isset($this->scheme)) {
              if ('' !== $this->scheme) {
                  $url .= $this->scheme . ':';
              }
              $url .= '//';
          }
  
          if (isset($this->user)) {
              $url .= $this->user;
  
              if (isset($this->pass)) {
                  $url .= ':' . $this->pass;
              }
  
              $url .= '@';
          }
  
          $url .= $this->host;
  
          if (isset($this->port)) {
              $url .= ':' . $this->port;
          }
  
          if (isset($this->path)) {
              if ($url != '' && $this->path[0] !== '/') {
                  $url .= '/';
              }
  
              $url .= $this->path;
          }
  
          return $url;
      }
code_tokens: public function getBaseUrl ( ) { $ url = '' ; if ( isset ( $ this -> scheme ) ) { if ( '' !== $ this -> scheme ) { $ url .= $ this -> scheme . ':' ; } $ url .= '//' ; } if ( isset ( $ this -> user ) ) { $ url .= $ this -> user ; if ( isset ( $ this -> pass ) ) { $ url .= ':' . $ this -> pass ; } $ url .= '@' ; } $ url .= $ this -> host ; if ( isset ( $ this -> port ) ) { $ url .= ':' . $ this -> port ; } if ( isset ( $ this -> path ) ) { if ( $ url != '' && $ this -> path [ 0 ] !== '/' ) { $ url .= '/' ; } $ url .= $ this -> path ; } return $ url ; }
docstring: Retrieve the base url.
  
  The base URL is the url without query part and fragment.
  
  @return string|null
docstring_tokens: Retrieve the base url .