-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
41 lines (34 loc) · 1.25 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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\ClassNotation\OrderedTraitsFixer;
use PhpCsFixer\Fixer\ClassNotation\SingleTraitInsertPerStatementFixer;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer;
use PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer;
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->rules([
OrderedTraitsFixer::class,
SingleQuoteFixer::class,
NoExtraBlankLinesFixer::class,
SingleTraitInsertPerStatementFixer::class,
]);
$ecsConfig->ruleWithConfiguration(YodaStyleFixer::class, [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
]);
$ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, [
'elements' => ['arrays'],
]);
$ecsConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$ecsConfig->import(SetList::CLEAN_CODE);
$ecsConfig->import(SetList::PSR_12);
$ecsConfig->parallel();
$ecsConfig->cacheDirectory('.ecs_cache');
};