DowngradeMixedTypeTypedPropertyRector
Removes mixed type property type definition, adding @var annotations instead.
class SomeClass
{
- private mixed $property;
+ /**
+ * @var mixed
+ */
+ private $property;
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\Property\DowngradeMixedTypeTypedPropertyRector;
return RectorConfig::configure()
->withRules([
DowngradeMixedTypeTypedPropertyRector::class,
]);