-
Notifications
You must be signed in to change notification settings - Fork 4
/
ecs.php
41 lines (34 loc) · 1.02 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 Symplify\EasyCodingStandard\Config\ECSConfig;
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $config): void {
// A. standalone rule
$config->ruleWithConfiguration(ArraySyntaxFixer::class, [
'syntax' => 'short',
]);
// B. full sets
$config->sets([
SetList::CLEAN_CODE,
SetList::PSR_12,
]);
// Set paths
$config->paths([
'packages',
'tests/Helpers',
'tests/TestCases',
'tests/Integration',
'tests/Unit',
//'src',
]);
// Skip
$config->skip([
SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff::class . '.UnusedProperty' => [
# The "private int $height" is used by Dto, via magic methods...
'tests/Helpers/Dummies/Properties/Accessibility/Person.php'
]
]);
// Run all checks parallel (should be much faster)
$config->parallel();
};