Skip to content

Commit

Permalink
🔨 edit ecs config
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuM committed Mar 22, 2024
1 parent 21a6f79 commit 9a519f2
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
};

0 comments on commit 9a519f2

Please sign in to comment.