From fc070f3bf6c0703afc5177a3e532827f88ce70a3 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 16 Mar 2017 16:24:47 +0100 Subject: [PATCH] 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 --- Readme.rst | 13 +++++++++++++ .../Sniffs/LegacyClassnames/DocCommentSniff.php | 2 +- src/Standards/Typo3Update/ruleset.xml | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Readme.rst b/Readme.rst index 4aba35d..71be644 100644 --- a/Readme.rst +++ b/Readme.rst @@ -119,3 +119,16 @@ the provided one. + +Typo3Update.LegacyClassnames.DocComment: ``allowedTags`` + Configures which tags are checked for legacy class names. + + Example: + +.. code:: xml + + + + + + diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php index 1f18228..7ab8eca 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php @@ -32,7 +32,7 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff implements PHP_CodeSni * The configured tags will be processed. * @var array */ - protected $allowedTags = ['@param', '@return', '@var']; + public $allowedTags = ['@param', '@return', '@var']; /** * Original token content for reuse accross methods. diff --git a/src/Standards/Typo3Update/ruleset.xml b/src/Standards/Typo3Update/ruleset.xml index b067e1d..c8e6a69 100644 --- a/src/Standards/Typo3Update/ruleset.xml +++ b/src/Standards/Typo3Update/ruleset.xml @@ -7,4 +7,9 @@ + + + + +