Run Rector on your code to see what it can do for you:
{ public static function b(): void { - test::a(); + (new test())->a(); } } test2::b();
Applied Rules:
Not a change you expect?
rector.php