RemoveAndTrueRector

Remove and true that has no added value

 class SomeClass
 {
     public function run()
     {
-        return true && 5 === 1;
+        return 5 === 1;
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\BooleanAnd\RemoveAndTrueRector;

return RectorConfig::configure()
    ->withRules([
        RemoveAndTrueRector::class,
    ]);
SETS:  Dead Code