Rule phpdoc_tag_type
¶
Forces PHPDoc tags to be either regular annotations or inline.
Configuration¶
Examples¶
Example #1¶
Default configuration.
--- Original
+++ New
<?php
/**
- * {@api}
+ * @api
*/
Example #2¶
With configuration: ['tags' => ['inheritdoc' => 'inline']]
.
--- Original
+++ New
<?php
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
Rule sets¶
The rule is part of the following rule sets:
@PhpCsFixer with config:
['tags' => ['inheritDoc' => 'inline']]
@Symfony with config:
['tags' => ['inheritDoc' => 'inline']]
References¶
Fixer class: PhpCsFixer\Fixer\Phpdoc\PhpdocTagTypeFixer
Test class: PhpCsFixer\Tests\Fixer\Phpdoc\PhpdocTagTypeFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.