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

 
 final class DemoFile
 {
-    public function resolve($item)
+    public function resolve(string $item)
     {
         return $item . ' world';
     }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 2.4.2 - released at 2026-04-16 14:00