original_string: public function fromRequest(Request $request)
      {
          $this->setBaseUrl($request->getBaseUrl());
          $this->setPathInfo($request->getPathInfo());
          $this->setMethod($request->getMethod());
          $this->setHost($request->getHost());
          $this->setScheme($request->getScheme());
          $this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort());
          $this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort);
          $this->setQueryString($request->server->get('QUERY_STRING', ''));
  
          return $this;
      }
code: public function fromRequest(Request $request)
      {
          $this->setBaseUrl($request->getBaseUrl());
          $this->setPathInfo($request->getPathInfo());
          $this->setMethod($request->getMethod());
          $this->setHost($request->getHost());
          $this->setScheme($request->getScheme());
          $this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort());
          $this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort);
          $this->setQueryString($request->server->get('QUERY_STRING', ''));
  
          return $this;
      }
code_tokens: public function fromRequest ( Request $ request ) { $ this -> setBaseUrl ( $ request -> getBaseUrl ( ) ) ; $ this -> setPathInfo ( $ request -> getPathInfo ( ) ) ; $ this -> setMethod ( $ request -> getMethod ( ) ) ; $ this -> setHost ( $ request -> getHost ( ) ) ; $ this -> setScheme ( $ request -> getScheme ( ) ) ; $ this -> setHttpPort ( $ request -> isSecure ( ) ? $ this -> httpPort : $ request -> getPort ( ) ) ; $ this -> setHttpsPort ( $ request -> isSecure ( ) ? $ request -> getPort ( ) : $ this -> httpsPort ) ; $ this -> setQueryString ( $ request -> server -> get ( 'QUERY_STRING' , '' ) ) ; return $ this ; }
docstring: Updates the RequestContext information based on a HttpFoundation Request.
  
  @return $this
docstring_tokens: Updates the RequestContext information based on a HttpFoundation Request .