PHP-CS-Fixer icon indicating copy to clipboard operation
PHP-CS-Fixer copied to clipboard

feature: Introduce configurability to PhpdocSeparationFixer

Open kusab85 opened this issue 1 year ago • 2 comments

Closes #5026.

Annotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other. Annotations of a different type are separated by a single blank line, ~~except those specified in additional_groups option~~.

Configuration

  • groups - sets of annotation types to be grouped together. default value: [['deprecated', 'link', 'see', 'since'], ['author', 'copyright', 'license'], ['category', 'package', 'subpackage'], ['property', 'property-read', 'property-write']]

  • ~~additional_groups - sets of additional annotation types to be grouped together.~~

  • psr_standard_tags_only - whether process PSR PHPDoc standard annotation tags only or any annotation tags

kusab85 avatar Jul 19 '22 10:07 kusab85

This would be great ; with https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/6466, it will close https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5026

VincentLanglet avatar Jul 25 '22 10:07 VincentLanglet

Coverage Status

Coverage increased (+0.008%) to 92.854% when pulling f2be031e5cd0fc38c100d97ecf47035990288c35 on gdl2studio:feature-configurability-to-phpdoc-separation-fixer into ee157265a6f5702de0c4826df25ee35fabb777c6 on FriendsOfPHP:master.

coveralls avatar Aug 08 '22 08:08 coveralls

Thank you @kusab85, great work!

julienfalque avatar Aug 24 '22 16:08 julienfalque

Thank you for this and #6466, I find docblock formatting to be particularly hard to maintain by hand :)

jrmajor avatar Aug 24 '22 19:08 jrmajor

You're welcome guys! ;-)

kusab85 avatar Aug 24 '22 21:08 kusab85