Closed mitchjam closed 7 years ago
So you want to remove unused use ? php-cs-fixer already do that, you can use it with the PHPCS plugin
I thought there must be something but for some reason when I looked I couldn't find a package to do it. Thanks.
I use the "find use" command constantly, however, when I have to remove something from the use block I have to search the whole file for references to that object. I would love a function that searches the current file for a reference to each class and removes any it doesn't find. There is similar functionality in PhpStorm.
PhpStorm: https://www.jetbrains.com/help/phpstorm/2017.1/optimizing-imports.html