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

 <?php
 
 class UserControllerTest extends \PHPUnit\Framework\TestCase
 {
-    /**
-     * @testWith ["2", 2, "null", "true", "false", true, false]
-     *           ["benjamin.sisko@ds9.example.com"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([2, 2, null, true, false, true, false])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['benjamin.sisko@ds9.example.com'])]
     public function testSomething(string $userId): void
     {
     }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: b855ff - released at 2026-01-22 19:37