CounterVisitor extends PHPSubscriptionCheck { public int getStatementNumber() { return statementCounter; } CounterVisitor(Tree tree); @Override List<Kind> nodesToVisit(); @Override void visitNode(Tree tree); int getFunctionNumber(); int getStatementNumber(); int getClassNumber();  }
@Test public void test_statements() throws Exception { CounterVisitor counterVisitor = new CounterVisitor(parse("metrics/statements.php")); assertThat(counterVisitor.getStatementNumber()).isEqualTo(29); }