Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Run Rector on your code to see what it can do for you:
// no change
PHP snippet to change
<?php final class UseDataProviderTest extends TestCase { #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')] public function test(string $val1, string $val2): void { } public static function dataProvider(): iterable { yield from [ ['value1', 'value2'], ['value3', 'value4'], ['value5', 'value6'], ['value7', 'value8'], ]; } }
Config
rector.php
<?php use Rector\Config\RectorConfig; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\ValueObject\PhpVersion; return RectorConfig::configure() ->withSets([ \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_CODE_QUALITY, ]) // demonstrate specific PHP version ->withPhpVersion(PhpVersion::PHP_84);
Run Rector
Rector version:
b09565
- released at 2026-05-25 06:37