boolean (@NotNull PsiVariable variable) { if (variable instanceof PsiParameter) { final PsiParameter parameter = (PsiParameter)variable; return !(parameter.getDeclarationScope() instanceof PsiForeachStatement); } return false; }