diff --git a/ecs.php b/ecs.php index e490a6a..a8fa439 100644 --- a/ecs.php +++ b/ecs.php @@ -2,29 +2,10 @@ declare(strict_types=1); -use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; +use Symplify\EasyCodingStandard\ValueObject\Set\SetList; -return ECSConfig::configure() - ->withPaths([ - __DIR__ . '/config', - __DIR__ . '/public', - __DIR__ . '/src', - __DIR__ . '/tests', - ]) - - // add a single rule - ->withRules([ - NoUnusedImportsFixer::class, - ]) - - // add sets - group of rules - // ->withPreparedSets( - // arrays: true, - // namespaces: true, - // spaces: true, - // docblocks: true, - // comments: true, - // ) - - ; +return static function (ECSConfig $ecsConfig): void { + // A. full sets + $ecsConfig->sets([SetList::PSR_12, SetList::CLEAN_CODE, SetList::COMMENTS, SetList::CONTROL_STRUCTURES, SetList::STRICT]); +};