DowngradeReflectionGetTypeRector

Downgrade reflection $reflection->getType() method call

 class SomeClass
 {
     public function run(ReflectionProperty $reflectionProperty)
     {
-        if ($reflectionProperty->getType()) {
+        if (method_exists($reflectionProperty, 'getType') ? $reflectionProperty->getType() ? null) {
             return true;
         }

         return false;
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector;

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