BoolReturnTypeFromBooleanStrictReturnsRector

Add bool return type based on strict bool returns type operations

 class SomeClass
 {
-    public function resolve($first, $second)
+    public function resolve($first, $second): bool
     {
         return $first > $second;
     }
 }

Configure your rector.php:

<?php

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

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