Remove unused @var annotation for properties
final class SomeClass
{
- /**
- * @var string
- */
public string $name = 'name';
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
return RectorConfig::configure()
->withRules([
RemoveUselessVarTagRector::class,
]);