Try Rector
Documentation
Hire Team
Blog
Contact
Try Rector
Documentation
Hire Team
Blog
Contact
Run Rector on your code to see what it can do for you:
// no change
PHP snippet to change
<?php final class SomeClass { public function run(): void { $closure = fn ($value) => $this->resolve($value); } private function resolve(int $value): void { } }
Config
rector.php
<?php use Rector\Config\RectorConfig; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\ValueObject\PhpVersion; return RectorConfig::configure() // A. whole set ->withPreparedSets(typeDeclarations: true);
Run Rector
Rector version:
3b8b78
- released at 2026-07-24 13:03