original_string: private function recomposeSymfonyRequest(Request $request)
      {
          try{
              try {
                  $content = $request->getContent(true);
              } catch (\LogicException $e) {
                  $content = $request->getContent();
              }
          }catch(\LogicException $e){
              $content = file_get_contents('php://input');
          }
          return $request::create(
              $request->getUri(),
              $request->getMethod(),
              $request->getMethod() === 'PATCH' ? $request->request->all() : $request->query->all(),
              $request->cookies->all(),
              $request->files->all(),
              $request->server->all(),
              $content
          );
      }
code: private function recomposeSymfonyRequest(Request $request)
      {
          try{
              try {
                  $content = $request->getContent(true);
              } catch (\LogicException $e) {
                  $content = $request->getContent();
              }
          }catch(\LogicException $e){
              $content = file_get_contents('php://input');
          }
          return $request::create(
              $request->getUri(),
              $request->getMethod(),
              $request->getMethod() === 'PATCH' ? $request->request->all() : $request->query->all(),
              $request->cookies->all(),
              $request->files->all(),
              $request->server->all(),
              $content
          );
      }
code_tokens: private function recomposeSymfonyRequest ( Request $ request ) { try { try { $ content = $ request -> getContent ( true ) ; } catch ( \ LogicException $ e ) { $ content = $ request -> getContent ( ) ; } } catch ( \ LogicException $ e ) { $ content = file_get_contents ( 'php://input' ) ; } return $ request :: create ( $ request -> getUri ( ) , $ request -> getMethod ( ) , $ request -> getMethod ( ) === 'PATCH' ? $ request -> request -> all ( ) : $ request -> query -> all ( ) , $ request -> cookies -> all ( ) , $ request -> files -> all ( ) , $ request -> server -> all ( ) , $ content ) ; }
docstring: Avoid exception throw when request content is null
  
  @param Request $request
  @return Request
docstring_tokens: Avoid exception throw when request content is null