-
Notifications
You must be signed in to change notification settings - Fork 3
/
easy-coding-standard.php
39 lines (25 loc) · 1.31 KB
/
easy-coding-standard.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
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\Alias\MbStrFunctionsFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer;
use PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
use PhpCsFixer\Fixer\Strict\StrictParamFixer;
use SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(DeclareStrictTypesFixer::class);
$services->set(StrictComparisonFixer::class);
$services->set(StrictParamFixer::class);
$services->set(ReturnTypeDeclarationFixer::class);
$services->set(AssignmentInConditionSniff::class);
$services->set(MbStrFunctionsFixer::class);
$services->set(OrderedClassElementsFixer::class);
$services->set(ClassAttributesSeparationFixer::class);
$parameters = $containerConfigurator->parameters();
$parameters->set('sets', ['clean-code', 'psr12']);
$parameters->set('exclude_files', ['node_modules/*', 'vendor/*', 'docs/*']);
};