Run Rector on your code to see what it can do for you:
<?php -function foo(int $bar = null){} +function foo(?int $bar = null){}
Applied Rules:
Not a change you expect?
rector.php