Run Rector on your code to see what it can do for you:

Config  rector.php
Rector version: b97fe1 - released at 2023-05-30 06:37