FunctionCognitiveComplexityCheck extends PHPVisitorCheck { public void setThreshold(int threshold) { this.threshold = threshold; }  @Override void visitFunctionDeclaration(FunctionDeclarationTree tree); @Override void visitFunctionExpression(FunctionExpressionTree tree); @Override void visitMethodDeclaration(MethodDeclarationTree tree); void setThreshold(int threshold); static final String KEY; static final int DEFAULT; }
@Test public void test() throws Exception { check.setThreshold(0); CheckVerifier.verify(check, "FunctionCognitiveComplexityCheck/zeroThreshold.php"); }