I am already using phpcs
/phpcbf
for sniffing my code. Unfortunately, I cannot find a tool or a rule for PHPCS which can automatically organize my imports. I know something like this exists for IDE's like PhpStorm, but I want it to make use of it within our CI/CD, too.
I want to do the following:
namespace A;
new \My\Custom\Class(new \Exception);
new \My\Custom\AnotherClass();
$a = \strlen("Test");
↓ ↓ ↓ ↓
namespace A;
use My\Custom\{Class, AnotherClass};
use Exception;
use function strlen;
new Class(new Exception);
new AnotherClass();
$a = strlen("Test");
Does something like this exist?