original_string: public function createPreflightCorsResponse(HttpRequest $request)
      {
          $response = new HttpResponse();
          $response->setStatusCode(200);
  
          $headers = $response->getHeaders();
  
          $headers->addHeaderLine('Access-Control-Allow-Origin', $this->getAllowedOriginValue($request));
          $headers->addHeaderLine('Access-Control-Allow-Methods', implode(', ', $this->options->getAllowedMethods()));
          $headers->addHeaderLine('Access-Control-Allow-Headers', implode(', ', $this->options->getAllowedHeaders()));
          $headers->addHeaderLine('Access-Control-Max-Age', $this->options->getMaxAge());
          $headers->addHeaderLine('Content-Length', 0);
  
          if ($this->options->getAllowedCredentials()) {
              $headers->addHeaderLine('Access-Control-Allow-Credentials', 'true');
          }
  
          return $response;
      }
code: public function createPreflightCorsResponse(HttpRequest $request)
      {
          $response = new HttpResponse();
          $response->setStatusCode(200);
  
          $headers = $response->getHeaders();
  
          $headers->addHeaderLine('Access-Control-Allow-Origin', $this->getAllowedOriginValue($request));
          $headers->addHeaderLine('Access-Control-Allow-Methods', implode(', ', $this->options->getAllowedMethods()));
          $headers->addHeaderLine('Access-Control-Allow-Headers', implode(', ', $this->options->getAllowedHeaders()));
          $headers->addHeaderLine('Access-Control-Max-Age', $this->options->getMaxAge());
          $headers->addHeaderLine('Content-Length', 0);
  
          if ($this->options->getAllowedCredentials()) {
              $headers->addHeaderLine('Access-Control-Allow-Credentials', 'true');
          }
  
          return $response;
      }
code_tokens: public function createPreflightCorsResponse ( HttpRequest $ request ) { $ response = new HttpResponse ( ) ; $ response -> setStatusCode ( 200 ) ; $ headers = $ response -> getHeaders ( ) ; $ headers -> addHeaderLine ( 'Access-Control-Allow-Origin' , $ this -> getAllowedOriginValue ( $ request ) ) ; $ headers -> addHeaderLine ( 'Access-Control-Allow-Methods' , implode ( ', ' , $ this -> options -> getAllowedMethods ( ) ) ) ; $ headers -> addHeaderLine ( 'Access-Control-Allow-Headers' , implode ( ', ' , $ this -> options -> getAllowedHeaders ( ) ) ) ; $ headers -> addHeaderLine ( 'Access-Control-Max-Age' , $ this -> options -> getMaxAge ( ) ) ; $ headers -> addHeaderLine ( 'Content-Length' , 0 ) ; if ( $ this -> options -> getAllowedCredentials ( ) ) { $ headers -> addHeaderLine ( 'Access-Control-Allow-Credentials' , 'true' ) ; } return $ response ; }
docstring: Create a preflight response by adding the corresponding headers
  
  @param  HttpRequest  $request
  @return HttpResponse
docstring_tokens: Create a preflight response by adding the corresponding headers