ReturnTypeFromStrictNativeCallRector

Add strict return type based native function or native method

 final class SomeClass
 {
-    public function run()
+    public function run(): int
     {
         return strlen('value');
     }
 }

Configure your rector.php:

<?php

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

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