Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
TamasSzigeti committed Oct 7, 2022
1 parent 4d155f1 commit d04940d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@
SingleQuoteFixer::class,
UpperCaseConstantNameSniff::class,
ModernizeTypesCastingFixer::class,
ModernizeStrposFixer::class,
]);

$isPhp7 = PHP_MAJOR_VERSION < 8;

if (!$isPhp7) {
$ecsConfig->rule(ModernizeStrposFixer::class);
}

$ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, [
'elements' => PHP_MAJOR_VERSION < 8 ? ['arrays', 'arguments'] : ['arrays', 'arguments', 'parameters', 'match'],
'elements' => $isPhp7 < 8 ? ['arrays', 'arguments'] : ['arrays', 'arguments', 'parameters', 'match'],
]);
$ecsConfig->ruleWithConfiguration(OrderedClassElementsFixer::class, [
'order' => ['use_trait', 'case', 'constant', 'property', 'construct', 'destruct', 'magic', 'method'],
Expand Down

0 comments on commit d04940d

Please sign in to comment.