-
Notifications
You must be signed in to change notification settings - Fork 13
/
ecs.php
52 lines (43 loc) · 1.44 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
46
47
48
49
50
51
52
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\FunctionNotation\StaticLambdaFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
use Symplify\CodingStandard\Fixer\LineLength\DocBlockLineLengthFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
$ecsConfig->paths([
__DIR__ . '/src',
__DIR__ . '/rules',
__DIR__ . '/tests',
__DIR__ . '/rules-tests',
__DIR__ . '/ecs.php',
__DIR__ . '/rector.php',
]);
$ecsConfig->ruleWithConfiguration(NoSuperfluousPhpdocTagsFixer::class, [
'allow_mixed' => true,
]);
$ecsConfig->ruleWithConfiguration(GeneralPhpdocAnnotationRemoveFixer::class, [
'annotations' => [
'throw',
'throws',
'author',
'authors',
'package',
'group',
'required',
'phpstan-ignore-line',
'phpstan-ignore-next-line',
],
]);
$ecsConfig->rule(StaticLambdaFixer::class);
$ecsConfig->skip([
'*/Source/*',
'*/Fixture/*',
'*/Expected/*',
// buggy - @todo fix on Symplify master
DocBlockLineLengthFixer::class,
]);
};