forked from deprecated-packages/symplify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecs.php
50 lines (40 loc) · 1.81 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(LineLengthFixer::class);
$containerConfigurator->import(SetList::CLEAN_CODE);
$containerConfigurator->import(SetList::SYMPLIFY);
$containerConfigurator->import(SetList::COMMON);
$containerConfigurator->import(SetList::PSR_12);
$containerConfigurator->import(SetList::DOCTRINE_ANNOTATIONS);
$parameters = $containerConfigurator->parameters();
// experimental
$parameters->set(Option::PARALLEL, false);
$parameters->set(Option::PATHS, [
__DIR__ . '/packages',
__DIR__ . '/tests',
__DIR__ . '/ecs.php',
__DIR__ . '/monorepo-builder.php',
__DIR__ . '/rector.php',
]);
$parameters->set(Option::SKIP, [
// paths to skip
'*/Fixture/*',
'*/Source/*',
__DIR__ . '/packages/easy-hydrator/tests/Fixture/TypedProperty.php',
__DIR__ . '/packages/easy-hydrator/tests/TypedPropertiesTest.php',
// PHP 8 only
__DIR__ . '/packages/phpstan-rules/tests/Rules/ForbiddenArrayWithStringKeysRule/FixturePhp80/SkipAttributeArrayKey.php',
__DIR__ . '/packages/phpstan-rules/tests/Rules/TooDeepNewClassNestingRule/FixturePhp8/SkipExpressionThrow.php',
// class in paths
PhpUnitStrictFixer::class => [
__DIR__ . '/packages/easy-coding-standard/tests/Indentation/IndentationTest.php',
],
]);
};