diff --git a/Readme.rst b/Readme.rst index ec4791d..ac25f77 100644 --- a/Readme.rst +++ b/Readme.rst @@ -121,3 +121,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/Sniffs/LegacyClassnames/InstanceofSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php index 05cf416..4140602 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php @@ -20,7 +20,7 @@ */ /** - * Detect and migrate extend and implement of old legacy classnames. + * Detect and migrate instanceof checks of old legacy classnames. */ class Typo3Update_Sniffs_LegacyClassnames_InstanceofSniff implements PHP_CodeSniffer_Sniff { diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php index 94bb175..989668a 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php @@ -22,7 +22,7 @@ use PHP_CodeSniffer_Tokens as Tokens; /** - * Detect and migrate static calls to old legacy classnames. + * Detect and migrate instantiations of old legacy classnames using "makeInstance". */ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithMakeInstanceSniff implements PHP_CodeSniffer_Sniff { diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php index d98dc79..e96d117 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php @@ -20,7 +20,7 @@ */ /** - * Detect and migrate static calls to old legacy classnames. + * Detect and migrate old legacy classnames instantiations using phps "new". */ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithNewSniff implements PHP_CodeSniffer_Sniff { diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php index c16b47d..dec134f 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php @@ -22,7 +22,7 @@ use PHP_CodeSniffer_Tokens as Tokens; /** - * Detect and migrate static calls to old legacy classnames. + * Detect and migrate old legacy classname instantiations using objectmanager create and get. */ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithObjectManagerSniff implements PHP_CodeSniffer_Sniff { 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 @@ + + + + +