-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathecs.php
33 lines (27 loc) · 865 Bytes
/
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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
// https://github.com/easy-coding-standard/easy-coding-standard/blob/main/README.md
// https://tomasvotruba.com/blog/2018/06/04/how-to-migrate-from-php-code-sniffer-to-easy-coding-standard/
// https://github.com/easy-coding-standard/easy-coding-standard?tab=readme-ov-file
// https://tomasvotruba.com/blog/zen-config-in-ecs
return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/examples',
])
// add a single rule
->withRules([
SingleQuoteFixer::class,
])
// add sets - group of rules
->withPreparedSets(
psr12: true,
arrays: true,
comments: true,
docblocks: true,
spaces: true,
namespaces: true,
)
;