boolean (PsiElement element) { if (isReturnKeyword(element)) { if (singleReturn != null) { singleReturn = null; return false; } if (!somethingBeforeReturn) { assert singleReturn == null; return false; } singleReturn = element; } if (!(element instanceof PsiWhiteSpace || element instanceof PsiComment)) { somethingBeforeReturn = true; } return true; }