original_string: public function convert(BrowserKitRequest $request, ServerRequestInterface $baseRequest)
      {
          $stream = $this->createStream($request);
          list($uri, $queryParams) = $this->buildFullUri($request);
          
          if ($baseRequest instanceof ServerRequest) {
              $serverParams = $this->determineServerParams($request, $uri, (array)$queryParams);
              $psrRequest = $baseRequest->withServerParams($request->getServer() + $serverParams);
          } else {
              $psrRequest = $this->setRequestHeaders($baseRequest, $request->getServer());
          }
          
          return $this->setRequestProperties($psrRequest, $request, $stream, $uri, (array)$queryParams);
      }
code: public function convert(BrowserKitRequest $request, ServerRequestInterface $baseRequest)
      {
          $stream = $this->createStream($request);
          list($uri, $queryParams) = $this->buildFullUri($request);
          
          if ($baseRequest instanceof ServerRequest) {
              $serverParams = $this->determineServerParams($request, $uri, (array)$queryParams);
              $psrRequest = $baseRequest->withServerParams($request->getServer() + $serverParams);
          } else {
              $psrRequest = $this->setRequestHeaders($baseRequest, $request->getServer());
          }
          
          return $this->setRequestProperties($psrRequest, $request, $stream, $uri, (array)$queryParams);
      }
code_tokens: public function convert ( BrowserKitRequest $ request , ServerRequestInterface $ baseRequest ) { $ stream = $ this -> createStream ( $ request ) ; list ( $ uri , $ queryParams ) = $ this -> buildFullUri ( $ request ) ; if ( $ baseRequest instanceof ServerRequest ) { $ serverParams = $ this -> determineServerParams ( $ request , $ uri , ( array ) $ queryParams ) ; $ psrRequest = $ baseRequest -> withServerParams ( $ request -> getServer ( ) + $ serverParams ) ; } else { $ psrRequest = $ this -> setRequestHeaders ( $ baseRequest , $ request -> getServer ( ) ) ; } return $ this -> setRequestProperties ( $ psrRequest , $ request , $ stream , $ uri , ( array ) $ queryParams ) ; }
docstring: Convert a codeception request to a PSR-7 server request
  
  @param BrowserKitRequest      $request
  @param ServerRequestInterface $baseRequest
  @return ServerRequest
docstring_tokens: Convert a codeception request to a PSR - 7 server request