Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/ecs.php

56 lines
1.7 KiB

<?php
/* For licensing terms, see /license.txt */
// Run php vendor/bin/ecs check src
// See documentation: https://github.com/symplify/easy-coding-standard
declare(strict_types=1);
use PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\DisallowLongArraySyntaxSniff;
use PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer;
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
//use SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(DisallowLongArraySyntaxSniff::class);
$services->set(TrailingCommaInMultilineArrayFixer::class);
$parameters = $containerConfigurator->parameters();
$parameters->set(
Option::SETS,
[
SetList::CLEAN_CODE,
SetList::SYMFONY,
//SetList::SYMFONY_RISKY,
]
);
$parameters->set(
Option::PATHS,
[
__DIR__.'/src',
]
);
/*$parameters->set(
Option::SKIP,
[
__DIR__.'/src/CourseBundle/Component/*',
]
);*/
// use $a++ instead of ++$a
$parameters->set(
Option::SKIP,
[
IncrementStyleFixer::class => 'post',
//UnusedVariableSniff::class . '.ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach' => true,
//UnusedVariableSniff::class => 'ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach',
]
);
};