-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecs.php
More file actions
32 lines (25 loc) · 767 Bytes
/
ecs.php
File metadata and controls
32 lines (25 loc) · 767 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
25
26
27
28
29
30
31
32
<?php
use craft\ecs\SetList;
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->parallel();
$ecsConfig->paths([
__DIR__ . '/src',
__FILE__,
]);
// Craft 5: keep using the Craft 4 set for now
$ecsConfig->sets([
SetList::CRAFT_CMS_4,
]);
$ecsConfig->ruleWithConfiguration(ConcatSpaceFixer::class, [
'spacing' => 'one',
]);
$ecsConfig->skip([
'no_useless_concat_operator',
]);
$ecsConfig->ruleWithConfiguration(FunctionDeclarationFixer::class, [
'closure_function_spacing' => 'one',
]);
};