Complete missing if/else brackets
class SomeClass
{
public function run($value)
{
- if ($value)
+ if ($value) {
return 1;
+ }
}
}
Configure your rector.php
:
<?php
use Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
CompleteMissingIfElseBracketRector::class,
]);