void (@NotNull PsiIfStatement statement) { super.visitIfStatement(statement); final PsiStatement thenBranch = statement.getThenBranch(); final PsiStatement elseBranch = statement.getElseBranch(); if (thenBranch != null && isEmpty(thenBranch)) { LocalQuickFix fix = elseBranch == null || isEmpty(elseBranch) ? createFix(statement, statement.getCondition()) : null; registerStatementError(statement, fix); return; } if (elseBranch != null && isEmpty(elseBranch)) { final PsiElement elseToken = statement.getElseElement(); if (elseToken == null) { return; } registerError(elseToken, new DeleteElementFix(elseBranch)); } }