diff --git a/README.md b/README.md index d6113ba..166c61b 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ Shared configuration for php-cs-fixer ## Installation - composer require --dev mll-lab/php-cs-fixer-config +```sh +composer require --dev mll-lab/php-cs-fixer-config +``` ## Usage diff --git a/config.php b/config.php index 5200f95..1727f52 100644 --- a/config.php +++ b/config.php @@ -69,6 +69,14 @@ function config(Finder $finder, array $ruleOverrides = []): Config 'phpdoc_to_comment' => false, // Intermediary PHPDocs are sometimes useful to provide type assertions for PHPStan 'single_line_empty_body' => true, 'single_line_throw' => false, + // TODO add trailing commas everywhere when dropping PHP 7.4 + 'trailing_comma_in_multiline' => [ + 'after_heredoc' => true, + 'elements' => [ + 'array_destructuring', + 'arrays', + ], + ], 'yoda_style' => [ // Not necessary with static analysis, non-Yoda is more natural to write and read 'equal' => false, 'identical' => false,