private void checkForForeachLoopParam(PsiExpression expression) {
      if (!m_checkForeachParameters) {
        return;
      }
      expression = PsiUtil.skipParenthesizedExprDown(expression);
      if (!(expression instanceof PsiReferenceExpression referenceExpression)) {
        return;
      }
      if (referenceExpression.getQualifierExpression() != null) {
        return;
      }
      PsiElement element = referenceExpression.resolve();
      if (!(element instanceof PsiParameter) || !(element.getParent() instanceof PsiForeachStatement)) {
        return;
      }
      registerError(expression, Boolean.TRUE);
    }
private void checkForForeachLoopParam(PsiExpression expression)