2020-07-16 17:51:53 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2020-07-18 11:24:54 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
2020-07-16 17:51:53 +02:00
|
|
|
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
|
|
|
|
use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
|
|
|
|
use PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer;
|
|
|
|
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
|
|
|
|
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
|
|
|
|
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
|
|
|
|
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
|
2020-08-24 23:25:26 +02:00
|
|
|
use Symplify\EasyCodingStandard\Configuration\Option;
|
|
|
|
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
|
2020-07-16 17:51:53 +02:00
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
$services = $containerConfigurator->services();
|
|
|
|
|
|
|
|
$services->set(NoUnusedImportsFixer::class);
|
|
|
|
$services->set(OrderedImportsFixer::class);
|
|
|
|
$services->set(NoLeadingImportSlashFixer::class);
|
|
|
|
$services->set(NoTrailingWhitespaceInCommentFixer::class);
|
|
|
|
$services->set(NoEmptyPhpdocFixer::class);
|
|
|
|
$services->set(ClassAttributesSeparationFixer::class);
|
|
|
|
$services->set(DeclareStrictTypesFixer::class);
|
2020-08-24 23:25:26 +02:00
|
|
|
|
|
|
|
$parameters = $containerConfigurator->parameters();
|
|
|
|
|
|
|
|
$parameters->set(Option::SETS, [
|
|
|
|
SetList::DOCTRINE_ANNOTATIONS,
|
|
|
|
]);
|
2020-07-16 17:51:53 +02:00
|
|
|
};
|