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

PHP snippet to change
Config  rector.php
Rector version: cb76a5 - released at 2024-11-19 18:25