Skip to content

Commit

Permalink
Upgrade ECS to v12.1
Browse files Browse the repository at this point in the history
New config syntax.
'common' no longer includes 'strict'.
  • Loading branch information
chrisminett committed Feb 2, 2024
1 parent dfa153b commit 55c9ffc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
])

$ecsConfig->sets([
->withSets([
SetList::COMMON,
SetList::PSR_12,
]);
SetList::STRICT,
])

$ecsConfig->skip([
->withSkip([
// Remove sniff, from common/control-structures
\PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer::class,

// Remove sniff, from common/spaces
\PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer::class,
\PhpCsFixer\Fixer\CastNotation\CastSpacesFixer::class,
]);
])

// PER Coding Style 7.1: "The `fn` keyword MUST NOT be succeeded by a space."
$ecsConfig->ruleWithConfiguration(
->withConfiguredRule(
\PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer::class,
[
'closure_fn_spacing' => 'none',
]
);
};

0 comments on commit 55c9ffc

Please sign in to comment.