From d1a2271e6ebe9c7b577130a61a0c7c5ecc82430d Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 7 Mar 2017 16:22:37 +0100 Subject: [PATCH] FIX: Adjust variable name and type * As the property only contains the content, and content is a string, we adjust the code accordingly. --- .../Sniffs/LegacyClassnames/DocCommentSniff.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php index 01c9b52..f2c1792 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php @@ -35,10 +35,10 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff implements PHP_CodeSni protected $allowedTags = ['@param', '@return', '@var']; /** - * Original token for reuse accross methods. - * @var array + * Original token content for reuse accross methods. + * @var string */ - protected $originalToken = []; + protected $originalTokenContent = ''; /** * Returns the token types that this sniff is interested in. @@ -73,20 +73,19 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff implements PHP_CodeSni } $classname = explode(' ', $tokens[$classnamePosition]['content'])[0]; - $this->originalToken = $tokens[$classnamePosition]['content']; + $this->originalTokenContent = $tokens[$classnamePosition]['content']; $this->addFixableError($phpcsFile, $classnamePosition, $classname); } /** * As token contains more then just class name, we have to build new content ourself. * - * * @param string $classname * @return string */ public function getTokenForReplacement($classname) { - $token = explode(' ', $this->originalToken); + $token = explode(' ', $this->originalTokenContent); $token[0] = $classname; return implode(' ', $token);