DowngradeTypedPropertyRector
Changes property type definition from type definitions to @var annotations.
class SomeClass
{
- private string $property;
+ /**
+ * @var string
+ */
+ private $property;
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector;
return RectorConfig::configure()
->withRules([
DowngradeTypedPropertyRector::class,
]);