Remove unnecessary ternary expressions
-$foo === $bar ? true : false;
+$foo === $bar;
Configure your rector.php
:
<?php
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
UnnecessaryTernaryExpressionRector::class,
]);