private static boolean singleReturnMethod(PsiMethod method) {
    int statementCount = Objects.requireNonNull(method.getBody()).getStatementCount();
    if (!method.hasModifierProperty(PsiModifier.STATIC) && PsiTreeUtil.getContextOfType(method, PsiClass.class) != null) { //this declaration
      statementCount--;
    }
    return statementCount <= 1;
  }
private static boolean singleReturnMethod(PsiMethod method)