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

PHP snippet to change
Config  rector.php
Rector version: 293eb9 - released at 2024-11-06 20:29