PHPAnalyzer { public void nextFile(PhpFile file) { currentFile = file; currentFileTree = (CompilationUnitTree) parser.parse(file.contents()); currentFileSymbolTable = SymbolTableImpl.create(currentFileTree, projectSymbolData, file); } PHPAnalyzer(ImmutableList<PHPCheck> checks, @Nullable File workingDir, ProjectSymbolData projectSymbolData);  PHPAnalyzer(ImmutableList<PHPCheck> checks, ImmutableList<PHPCheck> testFilesChecks, @Nullable File workingDir, ProjectSymbolData projectSymbolData); void nextFile(PhpFile file); List<PhpIssue> analyze(); List<PhpIssue> analyzeTest(); void terminate(); FileMeasures computeMeasures(FileLinesContext fileLinesContext); NewHighlighting getSyntaxHighlighting(SensorContext context, InputFile inputFile); NewSymbolTable getSymbolHighlighting(SensorContext context, InputFile inputFile); List<CpdToken> computeCpdTokens(); Set<Integer> computeNoSonarLines();  }
@Test(expected = RecognitionException.class) public void parsing_failure_should_raise_an_exception() throws IOException { PHPCheck check = new DummyCheck(); PHPAnalyzer analyzer = createAnalyzer(check); PhpFile file = FileTestUtils.getFile(tmpFolder.newFile(), "<?php if(condition): ?>"); analyzer.nextFile(file); }