original_string: public function review(ReporterInterface $reporter, ReviewableInterface $file)
      {
          $cmd = sprintf('php --syntax-check %s', $file->getFullPath());
  
          $process = $this->getProcess($cmd);
          $process->run();
  
          // Create the array of outputs and remove empty values.
          $output = array_filter(explode(PHP_EOL, $process->getOutput()));
  
          $needle = 'Parse error: syntax error, ';
  
          if (! $process->isSuccessful()) {
              foreach (array_slice($output, 0, count($output) - 1) as $error) {
                  $raw = ucfirst(substr($error, strlen($needle)));
                  $message = str_replace(' in ' . $file->getFullPath(), '', $raw);
                  $reporter->error($message, $this, $file);
              }
          }
      }
code: public function review(ReporterInterface $reporter, ReviewableInterface $file)
      {
          $cmd = sprintf('php --syntax-check %s', $file->getFullPath());
  
          $process = $this->getProcess($cmd);
          $process->run();
  
          // Create the array of outputs and remove empty values.
          $output = array_filter(explode(PHP_EOL, $process->getOutput()));
  
          $needle = 'Parse error: syntax error, ';
  
          if (! $process->isSuccessful()) {
              foreach (array_slice($output, 0, count($output) - 1) as $error) {
                  $raw = ucfirst(substr($error, strlen($needle)));
                  $message = str_replace(' in ' . $file->getFullPath(), '', $raw);
                  $reporter->error($message, $this, $file);
              }
          }
      }
code_tokens: public function review ( ReporterInterface $ reporter , ReviewableInterface $ file ) { $ cmd = sprintf ( 'php --syntax-check %s' , $ file -> getFullPath ( ) ) ; $ process = $ this -> getProcess ( $ cmd ) ; $ process -> run ( ) ; // Create the array of outputs and remove empty values. $ output = array_filter ( explode ( PHP_EOL , $ process -> getOutput ( ) ) ) ; $ needle = 'Parse error: syntax error, ' ; if ( ! $ process -> isSuccessful ( ) ) { foreach ( array_slice ( $ output , 0 , count ( $ output ) - 1 ) as $ error ) { $ raw = ucfirst ( substr ( $ error , strlen ( $ needle ) ) ) ; $ message = str_replace ( ' in ' . $ file -> getFullPath ( ) , '' , $ raw ) ; $ reporter -> error ( $ message , $ this , $ file ) ; } } }
docstring: Checks PHP files using the builtin PHP linter, `php -l`.
docstring_tokens: Checks PHP files using the builtin PHP linter php - l .