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

Config  rector.php
Rector version: 86eb51 - released at 2024-04-14 00:29