original_string: protected function setRequestHeaders(ServerRequestInterface $baseRequest, array $params)
      {
          $headers = (new ServerRequest())->withServerParams($params)->getHeaders();
          $psrRequest = $baseRequest;
  
          foreach ($headers as $header => $values) {
              $psrRequest = $psrRequest->withHeader($header, $values);
          }
          
          return $psrRequest;
      }
code: protected function setRequestHeaders(ServerRequestInterface $baseRequest, array $params)
      {
          $headers = (new ServerRequest())->withServerParams($params)->getHeaders();
          $psrRequest = $baseRequest;
  
          foreach ($headers as $header => $values) {
              $psrRequest = $psrRequest->withHeader($header, $values);
          }
          
          return $psrRequest;
      }
code_tokens: protected function setRequestHeaders ( ServerRequestInterface $ baseRequest , array $ params ) { $ headers = ( new ServerRequest ( ) ) -> withServerParams ( $ params ) -> getHeaders ( ) ; $ psrRequest = $ baseRequest ; foreach ( $ headers as $ header => $ values ) { $ psrRequest = $ psrRequest -> withHeader ( $ header , $ values ) ; } return $ psrRequest ; }
docstring: Set the request headers
  
  @param ServerRequestInterface $baseRequest
  @param array                  $params
  @retrun ServerRequestInterface
docstring_tokens: Set the request headers