original_string: public function openAction(Request $request)
      {
          if (null === $this->baseDir) {
              throw new NotFoundHttpException('The base dir should be set.');
          }
  
          if ($this->profiler) {
              $this->profiler->disable();
          }
  
          $file = $request->query->get('file');
          $line = $request->query->get('line');
  
          $filename = $this->baseDir.\DIRECTORY_SEPARATOR.$file;
  
          if (preg_match("'(^|[/\\\\])\.'", $file) || !is_readable($filename)) {
              throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file));
          }
  
          return new Response($this->twig->render('@WebProfiler/Profiler/open.html.twig', [
              'filename' => $filename,
              'file' => $file,
              'line' => $line,
           ]), 200, ['Content-Type' => 'text/html']);
      }
code: public function openAction(Request $request)
      {
          if (null === $this->baseDir) {
              throw new NotFoundHttpException('The base dir should be set.');
          }
  
          if ($this->profiler) {
              $this->profiler->disable();
          }
  
          $file = $request->query->get('file');
          $line = $request->query->get('line');
  
          $filename = $this->baseDir.\DIRECTORY_SEPARATOR.$file;
  
          if (preg_match("'(^|[/\\\\])\.'", $file) || !is_readable($filename)) {
              throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file));
          }
  
          return new Response($this->twig->render('@WebProfiler/Profiler/open.html.twig', [
              'filename' => $filename,
              'file' => $file,
              'line' => $line,
           ]), 200, ['Content-Type' => 'text/html']);
      }
code_tokens: public function openAction ( Request $ request ) { if ( null === $ this -> baseDir ) { throw new NotFoundHttpException ( 'The base dir should be set.' ) ; } if ( $ this -> profiler ) { $ this -> profiler -> disable ( ) ; } $ file = $ request -> query -> get ( 'file' ) ; $ line = $ request -> query -> get ( 'line' ) ; $ filename = $ this -> baseDir . \ DIRECTORY_SEPARATOR . $ file ; if ( preg_match ( "'(^|[/\\\\])\.'" , $ file ) || ! is_readable ( $ filename ) ) { throw new NotFoundHttpException ( sprintf ( 'The file "%s" cannot be opened.' , $ file ) ) ; } return new Response ( $ this -> twig -> render ( '@WebProfiler/Profiler/open.html.twig' , [ 'filename' => $ filename , 'file' => $ file , 'line' => $ line , ] ) , 200 , [ 'Content-Type' => 'text/html' ] ) ; }
docstring: Displays the source of a file.
  
  @return Response A Response instance
  
  @throws NotFoundHttpException
docstring_tokens: Displays the source of a file .