<?php
/**
* @author Firstname Lastname
* @copyright 2023 Company
* @license MIT
*
* This file is part of Project.
*
* For the full copyright and license information, please view the LICENSE
* file distributed with this source code.
*/
When using phpcs in addition to php-cs-fixer,
php-cs-fixer's phpdoc_separation rule group @author, @copyright and @license annotations together (like the example above).
phpcs's Symfony.Commenting.Annotations.Invalid rule detect this grouping as invalid.
Generally, the Symfony.Commenting.Annotations.Invalid rule will trigger on any PHPDoc annotations grouped together if they are not the same.
Fix proposal
Either ignore PHPDoc annotations in the regex (bad fix), or implement php-cs-fixer's phpdoc_separation grouping.
With this header added to PHP files:
When using
phpcs
in addition tophp-cs-fixer
,php-cs-fixer
's phpdoc_separation rule group@author
,@copyright
and@license
annotations together (like the example above).phpcs
'sSymfony.Commenting.Annotations.Invalid
rule detect this grouping as invalid.Generally, the
Symfony.Commenting.Annotations.Invalid
rule will trigger on any PHPDoc annotations grouped together if they are not the same.Fix proposal
Either ignore PHPDoc annotations in the regex (bad fix), or implement
php-cs-fixer
's phpdoc_separation grouping.