Example #1
0
 /**
  * @param string $file
  */
 public function scan($file)
 {
     // Set the current file used by the registry so that we can tell where the change was scanned.
     $this->registry->setCurrentFile($file);
     $code = file_get_contents($file);
     try {
         $statements = $this->parser->parse($code);
         $this->traverser->traverse($statements);
     } catch (Error $e) {
         throw new RuntimeException('Parse Error: ' . $e->getMessage() . ' in ' . $file);
     }
 }