-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
35 lines (30 loc) · 1.3 KB
/
ecs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php declare(strict_types=1);
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff;
use PhpCsFixer\Fixer\Basic\PsrAutoloadingFixer;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->sets([
SetList::CLEAN_CODE,
SetList::COMMON,
SetList::STRICT,
SetList::PSR_12,
]);
$ecsConfig->rules([
PsrAutoloadingFixer::class
]);
$ecsConfig->skip([
NotOperatorWithSuccessorSpaceFixer::class,
AssignmentInConditionSniff::class,
TrailingCommaInMultilineFixer::class,
BlankLineAfterOpeningTagFixer::class,
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer::class,
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer::class,
Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer::class
]);
$ecsConfig->cacheDirectory(__DIR__ . '/var/cache/cs_fixer');
$ecsConfig->paths([__DIR__ . '/src']);
};