Complete @var annotations or types based on @ORM\Column
use Doctrine\ORM\Mapping as ORM;
class SimpleColumn
{
/**
* @ORM\Column(type="string")
*/
- private $name;
+ private string|null $name = null;
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Doctrine\CodeQuality\Rector\Property\TypedPropertyFromColumnTypeRector;
return RectorConfig::configure()
->withRules([
TypedPropertyFromColumnTypeRector::class,
]);