phpcs: override trailing comma rule

The @Symfony ruleSet comes with trailing_comma_in_multiline's elements
set to ['array', 'array_destructuring', 'match', 'parameters'].
However, 'parameters' breaks PHP 7.4

Reference: https://cs.symfony.com/doc/rules/control_structure/trailing_comma_in_multiline.html

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2024-11-11 17:02:34 +01:00
parent 1d661e8c68
commit c4fe061a2e

View file

@ -37,6 +37,17 @@ return $config
// 'psr_autoloading' => true,
'strict_comparison' => true,
'strict_param' => true,
// We override next rule because of current @Symfony ruleSet
// 'parameters' element is breaking PHP 7.4
// https://cs.symfony.com/doc/rules/control_structure/trailing_comma_in_multiline.html
// TODO: remove this configuration after dropping support of PHP 7.4
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
'array_destructuring',
'match',
],
],
'concat_space' => [
'spacing' => 'one',
],