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

 <?php
 
-final class DemoFile implements Stringable
-{
+final class DemoFile
+{
     public function __toString()
     {
     	return 'tes';
-    }
+    }
 }
PHP snippet to change

Is the result wrong?

Create an issue Create a Test
Config  rector.php
Rector version: f5edbf - released at 2025-03-31 16:34