-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
42 lines (35 loc) · 1.17 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
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/ecs.php',
]);
$ecsConfig->sets([
SetList::ARRAY,
SetList::CLEAN_CODE,
SetList::COMMENTS,
SetList::DOCBLOCK,
SetList::NAMESPACES,
SetList::PSR_12,
SetList::SPACES,
]);
$ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, [
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
]);
$ecsConfig->ruleWithConfiguration(PhpdocLineSpanFixer::class, [
'const' => 'single',
'property' => 'single',
'method' => 'single',
]);
$ecsConfig->skip([
NotOperatorWithSuccessorSpaceFixer::class,
// __DIR__ . '/tests/Application', # Uncomment for Sylius plugins
]);
};