@Test public void terminate_call_forwarded_to_checks() throws Exception { PHPCheck check1 = spy(new DummyCheck()); PHPCheck check2 = spy(new DummyCheck()); PHPAnalyzer analyzer = createAnalyzer(check1, check2); analyzer.terminate(); verify(check1).terminate(); verify(check2).terminate(); }
public void terminate() { for (PHPCheck check : checks) { try { check.terminate(); } catch (Exception e) { LOG.warn("An error occurred while trying to terminate checks:", e); } } }
PHPAnalyzer { public void terminate() { for (PHPCheck check : checks) { try { check.terminate(); } catch (Exception e) { LOG.warn("An error occurred while trying to terminate checks:", e); } } } }
PHPAnalyzer { public void terminate() { for (PHPCheck check : checks) { try { check.terminate(); } catch (Exception e) { LOG.warn("An error occurred while trying to terminate checks:", e); } } } PHPAnalyzer(ImmutableList<PHPCheck> checks, @Nullable File workingDir, ProjectSymbolData projectSymbolData);  PHPAnalyzer(ImmutableList<PHPCheck> checks, ImmutableList<PHPCheck> testFilesChecks, @Nullable File workingDir, ProjectSymbolData projectSymbolData); }
PHPAnalyzer { public void terminate() { for (PHPCheck check : checks) { try { check.terminate(); } catch (Exception e) { LOG.warn("An error occurred while trying to terminate checks:", e); } } } 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(); }
PHPAnalyzer { public void terminate() { for (PHPCheck check : checks) { try { check.terminate(); } catch (Exception e) { LOG.warn("An error occurred while trying to terminate checks:", e); } } } 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();  }