BUGFIX: Define property where it's used

* As we use it in parent class, define it there.
This commit is contained in:
Daniel Siepmann 2017-03-23 16:48:28 +01:00
parent 842a54d5d9
commit 426dc8b318
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
6 changed files with 9 additions and 30 deletions

View file

@ -48,6 +48,15 @@ abstract class AbstractClassnameChecker implements PhpCsSniff
*/ */
protected $legacyMapping; protected $legacyMapping;
/**
* Used by some sniffs to keep original token for replacement.
*
* E.g. when Token itself is a whole inline comment, and we just want to replace the classname within.
*
* @var string
*/
protected $originalTokenContent = '';
public function __construct() public function __construct()
{ {
$this->legacyMapping = Mapping::getInstance(); $this->legacyMapping = Mapping::getInstance();

View file

@ -35,12 +35,6 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff extends AbstractClassn
*/ */
public $allowedTags = ['@param', '@return', '@var']; public $allowedTags = ['@param', '@return', '@var'];
/**
* Original token content for reuse accross methods.
* @var string
*/
protected $originalTokenContent = '';
/** /**
* Returns the token types that this sniff is interested in. * Returns the token types that this sniff is interested in.
* *

View file

@ -27,12 +27,6 @@ use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker;
*/ */
class Typo3Update_Sniffs_LegacyClassnames_InlineCommentSniff extends AbstractClassnameChecker class Typo3Update_Sniffs_LegacyClassnames_InlineCommentSniff extends AbstractClassnameChecker
{ {
/**
* Original token content for reuse accross methods.
* @var string
*/
protected $originalTokenContent = '';
/** /**
* Returns the token types that this sniff is interested in. * Returns the token types that this sniff is interested in.
* *

View file

@ -30,12 +30,6 @@ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithMakeInstanceSniff ext
{ {
use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait;
/**
* Original token content for reuse accross methods.
* @var string
*/
protected $originalTokenContent = '';
/** /**
* Returns the token types that this sniff is interested in. * Returns the token types that this sniff is interested in.
* *

View file

@ -29,12 +29,6 @@ class Typo3Update_Sniffs_LegacyClassnames_IsACallSniff extends AbstractClassname
{ {
use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait;
/**
* Original token content for reuse accross methods.
* @var string
*/
protected $originalTokenContent = '';
/** /**
* Returns the token types that this sniff is interested in. * Returns the token types that this sniff is interested in.
* *

View file

@ -31,12 +31,6 @@ class Typo3Update_Sniffs_LegacyClassnames_MissingVendorForPluginsAndModulesSniff
use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait;
use \Typo3Update\Sniffs\OptionsAccessTrait; use \Typo3Update\Sniffs\OptionsAccessTrait;
/**
* Original token content for reuse accross methods.
* @var string
*/
protected $originalTokenContent = '';
/** /**
* Returns the token types that this sniff is interested in. * Returns the token types that this sniff is interested in.
* *