-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecs.php
45 lines (42 loc) · 1.54 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
43
44
45
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer;
use Symplify\CodingStandard\Fixer\Annotation\RemovePHPStormAnnotationFixer;
use Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer;
use Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDefaultCommentFixer;
use Symplify\CodingStandard\Fixer\Spacing\StandaloneLinePromotedPropertyFixer;
use Symplify\CodingStandard\Fixer\Strict\BlankLineAfterStrictTypesFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withSkip([
__DIR__ . '/src/Core/Infrastructure/Migrations'
])
->withPhpCsFixerSets(
doctrineAnnotation: true,
perCS20: true
)
->withConfiguredRule(HeaderCommentFixer::class, [
'header' => 'This file has been created by Tomasz Kaliński (https://github.com/tomkalon)',
'location' => 'after_open'
])
->withRules([
NoUnusedImportsFixer::class,
ListSyntaxFixer::class,
StandaloneLinePromotedPropertyFixer::class,
RemoveUselessDefaultCommentFixer::class,
RemovePHPStormAnnotationFixer::class,
ParamReturnAndVarTagMalformsFixer::class,
HeaderCommentFixer::class,
BlankLineAfterStrictTypesFixer::class,
])
->withPreparedSets(
psr12: true
);