-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathecs.php
More file actions
44 lines (41 loc) · 1.15 KB
/
ecs.php
File metadata and controls
44 lines (41 loc) · 1.15 KB
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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use PhpCsFixer\Fixer\StringNotation\ExplicitStringVariableFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withParallel()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withCache(directory: '.cache/ecs')
->withSkip([
NotOperatorWithSuccessorSpaceFixer::class,
ExplicitStringVariableFixer::class,
])
->withPhpCsFixerSets(perCS: true)
->withPreparedSets(
common: true,
strict: true
)
->withConfiguredRule(
checkerClass: FunctionDeclarationFixer::class,
configuration: [
'closure_fn_spacing' => 'one',
],
)
->withConfiguredRule(
checkerClass: OrderedImportsFixer::class,
configuration: [
'sort_algorithm' => 'alpha',
'imports_order' => [
'const',
'class',
'function',
],
],
)
;