void (@NotNull GrIfStatement statement) { super.visitIfStatement(statement); final PsiElement parent = statement.getParent(); if (parent instanceof GrIfStatement parentStatement) { final GrStatement elseBranch = parentStatement.getElseBranch(); if (statement.equals(elseBranch)) { return; } } final int branches = calculateNumBranches(statement); if (branches <= getLimit()) { return; } registerStatementError(statement, statement); }