NumericReturnTypeFromStrictReturnsRector

Add int/float return type based on strict typed returns

 class SomeClass
 {
-    public function increase($value)
+    public function increase($value): int
     {
         return ++$value;
     }
 }

Configure your rector.php:

<?php

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

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