-
Notifications
You must be signed in to change notification settings - Fork 3
/
ecs.php
30 lines (25 loc) · 892 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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function(ECSConfig $ecsConfig): void {
$parameters = $ecsConfig->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/tests-api',
]);
$services = $ecsConfig->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [[
'syntax' => 'short',
]]);
$ecsConfig->import(SetList::SPACES);
$ecsConfig->import(SetList::STRICT);
$ecsConfig->import(SetList::ARRAY);
$ecsConfig->import(SetList::DOCBLOCK);
$ecsConfig->import(SetList::PSR_12);
$ecsConfig->import(SetList::CLEAN_CODE);
};