private static PsiType getType(@NotNull PsiArrayInitializerExpression initializer) {
    final PsiExpression[] initializers = initializer.getInitializers();
    final PsiElement parent = initializer.getParent();
    if (!(parent instanceof PsiAssignmentExpression assignmentExpression)) {
      if (initializers.length == 0) return null;
      return validateType(initializers[0].getType(), parent);
    }
    final PsiType type = assignmentExpression.getType();
    if (type instanceof PsiArrayType arrayType) {
      return validateType(arrayType.getComponentType(), parent);
    }
    if (initializers.length == 0) return null;
    return validateType(initializers[0].getType(), parent);
  }
private static PsiType getType(@NotNull PsiArrayInitializerExpression initializer)