FEATURE: Make PHPDoc tags configurable

* Make them configurable in Sniff.
* Extend readme with new configuration option.
* Provide example in ruleset.xml

Resolves: #25, #24, #23
This commit is contained in:
Daniel Siepmann 2017-03-16 16:24:47 +01:00
parent 1b2e72ec96
commit fc070f3bf6
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 19 additions and 1 deletions

View file

@ -119,3 +119,16 @@ the provided one.
<property name="legacyExtensions" type="array" value="Extbase,Fluid,Frontend,Core"/>
</properties>
</rule>
Typo3Update.LegacyClassnames.DocComment: ``allowedTags``
Configures which tags are checked for legacy class names.
Example:
.. code:: xml
<rule ref="Typo3Update.LegacyClassnames.DocComment">
<properties>
<property name="allowedTags" type="array" value="@param,@return,@var,@see,@throws"/>
</properties>
</rule>

View file

@ -32,7 +32,7 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff implements PHP_CodeSni
* The configured tags will be processed.
* @var array<string>
*/
protected $allowedTags = ['@param', '@return', '@var'];
public $allowedTags = ['@param', '@return', '@var'];
/**
* Original token content for reuse accross methods.

View file

@ -7,4 +7,9 @@
<property name="legacyExtensions" type="array" value="Extbase,Fluid,Frontend,Core"/>
</properties>
</rule>
<rule ref="Typo3Update.LegacyClassnames.DocComment">
<properties>
<property name="allowedTags" type="array" value="@param,@return,@var,@see,@throws"/>
</properties>
</rule>
</ruleset>