void (@NotNull PsiThisExpression thisValue) { super.visitThisExpression(thisValue); if (thisValue.getQualifier() != null) { return; } PsiElement parent = thisValue.getParent(); while (parent instanceof PsiParenthesizedExpression || parent instanceof PsiConditionalExpression || parent instanceof PsiTypeCastExpression) { parent = parent.getParent(); } if (!(parent instanceof PsiReturnStatement)) { return; } registerError(thisValue); }