ParamTypeByParentCallTypeRector

Change param type based on parent param type

 class SomeControl
 {
     public function __construct(string $name)
     {
     }
 }

 class VideoControl extends SomeControl
 {
-    public function __construct($name)
+    public function __construct(string $name)
     {
         parent::__construct($name);
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;

return RectorConfig::configure()
    ->withRules([
        ParamTypeByParentCallTypeRector::class,
    ]);