calendar/ecs.php
Daniel Siepmann 6fff1efe49
Replace phpcs with ecs
This combines phpcs and php-cs-fixer and provides handy configuration.
2021-02-23 11:41:18 +01:00

35 lines
1 KiB
PHP

<?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',
]]);
};