|
|
|
@ -7,13 +7,19 @@ |
|
|
|
|
|
|
|
|
|
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 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, |
|
|
|
@ -31,12 +37,12 @@ return static function (ContainerConfigurator $containerConfigurator): void { |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$parameters->set( |
|
|
|
|
Option::EXCLUDE_PATHS, |
|
|
|
|
/*$parameters->set( |
|
|
|
|
Option::SKIP, |
|
|
|
|
[ |
|
|
|
|
__DIR__.'/src/CourseBundle/Component/*', |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
);*/ |
|
|
|
|
|
|
|
|
|
// use $a++ instead of ++$a |
|
|
|
|
$parameters->set( |
|
|
|
@ -44,7 +50,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { |
|
|
|
|
[ |
|
|
|
|
IncrementStyleFixer::class => 'post', |
|
|
|
|
//UnusedVariableSniff::class . '.ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach' => true, |
|
|
|
|
UnusedVariableSniff::class => 'ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach', |
|
|
|
|
//UnusedVariableSniff::class => 'ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach', |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|