Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Bugfix - Fix imports by use statements no longer working due to my refactoring. #131

Closed ghost closed 9 years ago

ghost commented 9 years ago

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!

Peekmo commented 9 years ago

Honestly, I don't notice the bug too (even on a day of work on php files). It's a specific case np. Everything is alright now thank you :+1: