123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- =========================================
- Rule ``general_phpdoc_annotation_remove``
- =========================================
- Configured annotations should be omitted from PHPDoc.
- Configuration
- -------------
- ``annotations``
- ~~~~~~~~~~~~~~~
- List of annotations to remove, e.g. ``["author"]``.
- Allowed types: ``array``
- Default value: ``[]``
- ``case_sensitive``
- ~~~~~~~~~~~~~~~~~~
- Should annotations be case sensitive.
- Allowed types: ``bool``
- Default value: ``true``
- Examples
- --------
- Example #1
- ~~~~~~~~~~
- With configuration: ``['annotations' => ['author']]``.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- /**
- * @internal
- - * @author John Doe
- * @AuThOr Jane Doe
- */
- function foo() {}
- Example #2
- ~~~~~~~~~~
- With configuration: ``['annotations' => ['author'], 'case_sensitive' => false]``.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- /**
- * @internal
- - * @author John Doe
- - * @AuThOr Jane Doe
- */
- function foo() {}
- Example #3
- ~~~~~~~~~~
- With configuration: ``['annotations' => ['package', 'subpackage']]``.
- .. code-block:: diff
- --- Original
- +++ New
- <?php
- /**
- * @author John Doe
- - * @package ACME API
- - * @subpackage Authorization
- * @version 1.0
- */
- function foo() {}
|