SimplifyIfReturnBoolRector

Shortens if return false/true to direct return

-if (strpos($docToken->getContent(), "\n") === false) {
-    return true;
-}
-
-return false;
+return strpos($docToken->getContent(), "\n") === false;

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
use Rector\Config\RectorConfig;

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