-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathecs.php
More file actions
24 lines (20 loc) · 765 Bytes
/
ecs.php
File metadata and controls
24 lines (20 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
use craft\ecs\SetList;
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer;
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $ecsConfig): void {
$paths = [
__DIR__ . '/src',
__FILE__,
];
$ecsConfig->paths($paths);
$ecsConfig->parallel();
$ecsConfig->sets([SetList::CRAFT_CMS_4]);
$ecsConfig->rule(ArrayIndentationFixer::class);
$ecsConfig->rule(MethodChainingIndentationFixer::class);
$ecsConfig->ruleWithConfiguration(FunctionDeclarationFixer::class, [
'closure_function_spacing' => FunctionDeclarationFixer::SPACING_ONE,
]);
};