-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
46 lines (35 loc) · 1.45 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
<?php
declare(strict_types=1);
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultFileExtensions;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultIndentation;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultLineEnding;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultRules;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultRulesWithConfiguration;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultSets;
use Ctw\Qa\EasyCodingStandard\Config\ECSConfig\DefaultSkip;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $ecsConfig): void {
$fileExtensions = new DefaultFileExtensions();
$indentation = new DefaultIndentation();
$lineEnding = new DefaultLineEnding();
$rules = new DefaultRules();
$rulesConfig = new DefaultRulesWithConfiguration();
$sets = new DefaultSets();
$skip = new DefaultSkip();
$ecsConfig->fileExtensions($fileExtensions());
// @phpstan-ignore-next-line
$ecsConfig->indentation($indentation());
$ecsConfig->lineEnding($lineEnding());
$ecsConfig->paths(
[
sprintf('%s/src', __DIR__),
sprintf('%s/test', __DIR__),
sprintf('%s/ecs.php', __DIR__),
sprintf('%s/rector.php', __DIR__),
]
);
$ecsConfig->sets($sets());
$ecsConfig->rules($rules());
$ecsConfig->rulesWithConfiguration($rulesConfig());
$ecsConfig->skip($skip());
};