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 namespace tracking; class Baureihen { public bool $karosserie; } final class CarIdentifierNoResult { private ?string $body = null; /** * @param Baureihe|null $modelSeries */ public function __construct( $modelSeries, ) { $this->body = $modelSeries ? $modelSeries->karosserie : null; } }
Config
rector.php
<?php use Rector\Config\RectorConfig; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\ValueObject\PhpVersion; return RectorConfig::configure() ->withRules([ ReadOnlyPropertyRector::class ]) ;
Run Rector
Rector version:
5fea92
- released at 2026-08-24 13:03