forked from ausi/slug-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.php
41 lines (34 loc) · 1.47 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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer;
use PhpCsFixer\Fixer\FunctionNotation\UseArrowFunctionsFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitExpectationFixer;
use SlevomatCodingStandard\Sniffs\Variables\UselessVariableSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(__DIR__.'/vendor/contao/easy-coding-standard/config/set/contao.php');
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::INDENTATION, 'tab');
$parameters->set(Option::SKIP, [
NewWithBracesFixer::class => null,
UselessVariableSniff::class => null,
PhpUnitExpectationFixer::class => null,
UseArrowFunctionsFixer::class,
]);
$services = $containerConfigurator->services();
$services
->set(HeaderCommentFixer::class)
->call('configure', [[
'header' => "This file is part of the ausi/slug-generator package.\n\n(c) Martin Auswöger <[email protected]>\n\nFor the full copyright and license information, please view the LICENSE\nfile that was distributed with this source code.",
]]);
$services
->set(YodaStyleFixer::class)
->call('configure', [[
'equal' => false,
'identical' => false,
'less_and_greater' => false,
]]);
};