Add known magic methods parameter and return type declarations
final class SomeClass
{
- public function __call($method, $args)
+ public function __call(string $method, array $args)
{
}
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\KnownMagicClassMethodTypeRector;
return RectorConfig::configure()
->withRules([
KnownMagicClassMethodTypeRector::class,
]);