It turned out that, with my last pull request fixing imports, I broke imports by use statement (the one thing I didn't test, the irony ;-) due to simply having forgotten to handle the 'else' clause (i.e. when useStatementFound was true).
I also did some minor refactoring, improving clarity and making sure the provider always returns data, does not fetch the same class twice if unnecessary and loosening the restriction of the class having to be available in the class map. The latter I did because, as far as I can see, all the code here can cope with classes that aren't in the Composer classmap; if there is an unsupported file, it will simply silently fail, but in many cases it could still work, providing autocompletion for those classes as well. However, if this is something you don't want (or there are corner cases I didn't see), let me know.
Hello
It turned out that, with my last pull request fixing imports, I broke imports by use statement (the one thing I didn't test, the irony ;-) due to simply having forgotten to handle the 'else' clause (i.e. when
useStatementFound
was true).I also did some minor refactoring, improving clarity and making sure the provider always returns data, does not fetch the same class twice if unnecessary and loosening the restriction of the class having to be available in the class map. The latter I did because, as far as I can see, all the code here can cope with classes that aren't in the Composer classmap; if there is an unsupported file, it will simply silently fail, but in many cases it could still work, providing autocompletion for those classes as well. However, if this is something you don't want (or there are corner cases I didn't see), let me know.
Sorry to bother you with this again!