Rector run "7fc1e951-3ee0-4b17-969a-be382a91b5aa" was not found. Try to run code again for new result
Run Rector on your code to see what it can do for you:
<?php
final class DemoFile
{
public function run(bool $param)
if ($this->isTrue($param)) {
return 5;
}
return '10';
private function isTrue($value)
return $value === true;
rector.php
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
return RectorConfig::configure()
// A. whole set
->withPreparedSets(typeDeclarations: true)
// B. or few rules
->withRules([
TypedPropertyFromAssignsRector::class
]);