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

 <?php
 
 declare(strict_types=1);
 
 readonly class Foo extends FooBase implements FooInterface
 {
+    /**
+     * @return array<int, int>
+     */
     #[Override]
     public function getCodes(): iterable
     {
         ];
     }
 
+    /**
+     * @return array<int, string>
+     */
     #[Override]
     public function getMethods(): iterable
     {
PHP snippet to change

Applied Rules:

Not a change you expect?

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