calendar/ecs.php

36 lines
1 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/Classes',
__DIR__ . '/Tests',
__DIR__ . '/ext_emconf.php',
__DIR__ . '/ecs.php',
]);
$parameters->set(Option::SETS, [
// run and fix, one by one
// SetList::SPACES,
// SetList::ARRAY,
// SetList::DOCBLOCK,
// SetList::NAMESPACES,
// SetList::CONTROL_STRUCTURES,
// SetList::CLEAN_CODE,
SetList::PSR_12,
]);
$services = $containerConfigurator->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [[
'syntax' => 'short',
]]);
};