Configured annotations should be omitted from PHPDoc.
List of annotations to remove, e.g. ["author"]
.
Allowed types: list<string>
Default value: []
Should annotations be case sensitive.
Allowed types: bool
Default value: true
With configuration: ['annotations' => ['author']]
.
--- Original
+++ New
<?php
/**
* @internal
- * @author John Doe
* @AuThOr Jane Doe
*/
function foo() {}
With configuration: ['annotations' => ['author'], 'case_sensitive' => false]
.
--- Original
+++ New
<?php
/**
* @internal
- * @author John Doe
- * @AuThOr Jane Doe
*/
function foo() {}
With configuration: ['annotations' => ['package', 'subpackage']]
.
--- Original
+++ New
<?php
/**
* @author John Doe
- * @package ACME API
- * @subpackage Authorization
* @version 1.0
*/
function foo() {}
- Fixer class: PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer
- Test class: PhpCsFixer\Tests\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.