Skip to content

Commit

Permalink
Only apply RemoveAlwaysTrueIfConditionRector to .phtml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwindell authored Oct 23, 2023
1 parent 8cd1080 commit 46d6ad8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@
use Rector\Php81\Rector\ClassConst\FinalizePublicClassConstantRector;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;

public static function applyRectorDefaults(RectorConfig $rectorConfig) {
function applyRectorDefaults(RectorConfig $rectorConfig) {
$rectorConfig->phpstanConfig(__DIR__ . '/../../../phpstan.neon');

$rectorConfig->skip([
__DIR__ . '/vendor',

NewlineAfterStatementRector::class => [
'*.phtml',
],

// Stop rector breaking short open tags
RemoveAlwaysTrueIfConditionRector::class => [
'*.phtml',
],

ExplicitBoolCompareRector::class,
FinalizePublicClassConstantRector::class,
RemoveAlwaysTrueIfConditionRector::class
FinalizePublicClassConstantRector::class
]);

$rectorConfig->fileExtensions([
Expand Down

0 comments on commit 46d6ad8

Please sign in to comment.