DowngradeMixedTypeDeclarationRector
Remove the "mixed" param and return type, add a @param and @return tag instead
class SomeClass
{
- public function someFunction(mixed $anything): mixed
+ /**
+ * @param mixed $anything
+ * @return mixed
+ */
+ public function someFunction($anything)
{
}
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector;
return RectorConfig::configure()
->withRules([
DowngradeMixedTypeDeclarationRector::class,
]);