original_string: protected function deliver(Response $response)
      {
          if (!$response->isSuccessful()) {
              throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $this->requestStack->getCurrentRequest()->getUri(), $response->getStatusCode()));
          }
  
          if (!$response instanceof StreamedResponse) {
              return $response->getContent();
          }
  
          $response->sendContent();
      }
code: protected function deliver(Response $response)
      {
          if (!$response->isSuccessful()) {
              throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %s).', $this->requestStack->getCurrentRequest()->getUri(), $response->getStatusCode()));
          }
  
          if (!$response instanceof StreamedResponse) {
              return $response->getContent();
          }
  
          $response->sendContent();
      }
code_tokens: protected function deliver ( Response $ response ) { if ( ! $ response -> isSuccessful ( ) ) { throw new \ RuntimeException ( sprintf ( 'Error when rendering "%s" (Status code is %s).' , $ this -> requestStack -> getCurrentRequest ( ) -> getUri ( ) , $ response -> getStatusCode ( ) ) ) ; } if ( ! $ response instanceof StreamedResponse ) { return $ response -> getContent ( ) ; } $ response -> sendContent ( ) ; }
docstring: Delivers the Response as a string.
  
  When the Response is a StreamedResponse, the content is streamed immediately
  instead of being returned.
  
  @return string|null The Response content or null when the Response is streamed
  
  @throws \RuntimeException when the Response is not successful
docstring_tokens: Delivers the Response as a string .