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

 
 final class DemoFile
 {
-    private $prop;
+    private ?callable $prop = null;
     
     public function set(callable $prop): void
     {
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: e65ac6 - released at 2026-02-05 16:20