This repository has been archived by the owner on May 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
63 lines (58 loc) · 2.54 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
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer;
use PhpCsFixer\Fixer\ClassNotation\FinalClassFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
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 {
$containerConfigurator->import(SetList::PSR_12);
$containerConfigurator->import(SetList::CLEAN_CODE);
$containerConfigurator->import(SetList::ARRAY);
$containerConfigurator->import(SetList::COMMENTS);
$containerConfigurator->import(SetList::DOCBLOCK);
$containerConfigurator->import(SetList::NAMESPACES);
$containerConfigurator->import(SetList::STRICT);
$containerConfigurator->import(SetList::DOCTRINE_ANNOTATIONS);
$containerConfigurator->import(SetList::SYMFONY);
$containerConfigurator->import(SetList::SYMFONY_RISKY);
$containerConfigurator->import(SetList::PHPUNIT);
$containerConfigurator
->parameters()
->set(Option::PATHS, [
__FILE__,
__DIR__ . '/rector.php',
__DIR__ . '/example/',
__DIR__ . '/src/',
__DIR__ . '/tests/',
])
->set(Option::SKIP, [
FinalClassFixer::class => [__DIR__ . '/tests/Support'],
PhpUnitStrictFixer::class => [
/* @see \FamilyOffice\FixturesLibrary\Tests\Unit\Dependency\ChainBuilderTest::testCreateDefault() */
__DIR__ . '/tests/Unit/Dependency/ChainBuilderTest.php',
/* @see \FamilyOffice\FixturesLibrary\Tests\Unit\Loader\ChainLoaderTest::testCreateDefault() */
__DIR__ . '/tests/Unit/Loader/ChainLoaderTest.php',
],
])
->set(Option::PARALLEL, true);
$containerConfigurator
->services()
->set(ConcatSpaceFixer::class)->call('configure', [[
'spacing' => 'one',
]])
->set(CastSpacesFixer::class)->call('configure', [[
'space' => 'none',
]])
->set(LineLengthFixer::class)->call('configure', [[
'max_line_length' => 180,
'break_long_lines' => true,
'inline_short_lines' => true,
]])
->set(DeclareStrictTypesFixer::class)
->set(FinalClassFixer::class);
};