void (@NotNull PsiParameter parameter) { PsiElement declarationScope = parameter.getDeclarationScope(); boolean needToProcessParameter; if (declarationScope instanceof PsiMethod || declarationScope instanceof PsiLambdaExpression) { if (declarationScope instanceof PsiLambdaExpression) { declarationScope = PsiTreeUtil.getParentOfType(declarationScope, PsiModifierListOwner.class); } needToProcessParameter = compareVisibilities((PsiModifierListOwner)declarationScope, myUnusedSymbolInspection.getParameterVisibility()); } else { needToProcessParameter = myUnusedSymbolInspection.LOCAL_VARIABLE; } if (needToProcessParameter) { processParameter(myProject, parameter); } }