Skip to content

Commit

Permalink
chore: add version-compare-func-call-to-constant rule
Browse files Browse the repository at this point in the history
Add Rector rule in order to replace PHP_VERSION by PHP_VERSION_ID.
@samsonasik suggestion: codeigniter4#8619
  • Loading branch information
justbyitself authored Mar 11, 2024
1 parent 25e3a74 commit 6bcd101
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
Expand Down Expand Up @@ -149,6 +150,7 @@
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);
$rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class);
$rectorConfig->rule(SingleInArrayToCompareRector::class);
$rectorConfig->rule(VersionCompareFuncCallToConstantRector::class);

$rectorConfig
->ruleWithConfiguration(StringClassNameToClassConstantRector::class, [
Expand Down

0 comments on commit 6bcd101

Please sign in to comment.