Skip to content

Commit

Permalink
Merge pull request #49 from e-lodgy/fix/clean-up
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
benjaminmal authored Oct 16, 2023
2 parents dfde605 + 9f312ab commit db66c46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
PhpUnitConstructFixer::class,
PhpUnitDedicateAssertFixer::class,
PhpUnitDedicateAssertInternalTypeFixer::class,
PhpUnitExpectationFixer::class,
PhpUnitMethodCasingFixer::class,
SelfStaticAccessorFixer::class,
SemicolonAfterInstructionFixer::class,
Expand Down Expand Up @@ -197,12 +198,10 @@
'use',
]]);

// The check fails on PHP <8.0. See https://github.com/symplify/symplify/issues/3130
if (\PHP_VERSION_ID >= 80000) {
$config->rule(PhpUnitExpectationFixer::class);
}

if (\PHP_VERSION_ID < 80000) {
// The check fails on PHP <8.0. See https://github.com/symplify/symplify/issues/3130
$config->skip([PhpUnitExpectationFixer::class]);

// Override, parameters are only available in PHP 8+
$config->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, ['elements' => ['arguments', 'arrays']]);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/errors/trailing_comma_in_multiline.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
'hello',
'yo'
];

class A {
public function analyse(
$a,
$b,
$c
) {
}
}

0 comments on commit db66c46

Please sign in to comment.