original_string: public function current($includeQuery = true)
      {
          $url = "";
          if (!$this->serverVars && php_sapi_name() == 'cli') {
              $url = "cli";
          } else {
              $url .= $this->currentScheme().$this->currentHost();
              $port = $this->currentPort();
              if (!in_array($port, [ false, 80])) {
                  $url .= ':'.$port;
              }
              $url .= $this->currentPath();
              if ($includeQuery) {
                  $query = $this->currentQuery();
                  if ($query) {
                      $url .= '?'.$query;
                  }
              }
          }
          return static::create($url);
      }
code: public function current($includeQuery = true)
      {
          $url = "";
          if (!$this->serverVars && php_sapi_name() == 'cli') {
              $url = "cli";
          } else {
              $url .= $this->currentScheme().$this->currentHost();
              $port = $this->currentPort();
              if (!in_array($port, [ false, 80])) {
                  $url .= ':'.$port;
              }
              $url .= $this->currentPath();
              if ($includeQuery) {
                  $query = $this->currentQuery();
                  if ($query) {
                      $url .= '?'.$query;
                  }
              }
          }
          return static::create($url);
      }
code_tokens: public function current ( $ includeQuery = true ) { $ url = "" ; if ( ! $ this -> serverVars && php_sapi_name ( ) == 'cli' ) { $ url = "cli" ; } else { $ url .= $ this -> currentScheme ( ) . $ this -> currentHost ( ) ; $ port = $ this -> currentPort ( ) ; if ( ! in_array ( $ port , [ false , 80 ] ) ) { $ url .= ':' . $ port ; } $ url .= $ this -> currentPath ( ) ; if ( $ includeQuery ) { $ query = $ this -> currentQuery ( ) ; if ( $ query ) { $ url .= '?' . $ query ; } } } return static :: create ( $ url ) ; }
docstring: Get the URL of current request.
  
  @param bool $includeQuery <p>Include the query string in the result</p>
  @return Url The URL of the current request or cli if called from the command line
docstring_tokens: Get the URL of current request .