TASK: Cleanup php code
* Adjust variable name, as this is generic and not about constants.
This commit is contained in:
parent
896117aa01
commit
e7dbac4d33
1 changed files with 8 additions and 8 deletions
|
@ -45,7 +45,7 @@ abstract class AbstractGenericUsage implements PhpCsSniff
|
||||||
protected $configured = [];
|
protected $configured = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for the current sniff instance.
|
* Entries removed in current sniff.
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $removed = [];
|
protected $removed = [];
|
||||||
|
@ -203,16 +203,16 @@ abstract class AbstractGenericUsage implements PhpCsSniff
|
||||||
*/
|
*/
|
||||||
protected function addMessage(PhpCsFile $phpcsFile, $tokenPosition)
|
protected function addMessage(PhpCsFile $phpcsFile, $tokenPosition)
|
||||||
{
|
{
|
||||||
foreach ($this->removed as $constant) {
|
foreach ($this->removed as $removed) {
|
||||||
$phpcsFile->addWarning(
|
$phpcsFile->addWarning(
|
||||||
'Legacy calls are not allowed; found %s. Removed in %s. %s. See: %s',
|
'Legacy calls are not allowed; found %s. Removed in %s. %s. See: %s',
|
||||||
$tokenPosition,
|
$tokenPosition,
|
||||||
$this->getIdentifier($constant),
|
$this->getIdentifier($removed),
|
||||||
[
|
[
|
||||||
$this->getOldUsage($constant),
|
$this->getOldUsage($removed),
|
||||||
$this->getRemovedVersion($constant),
|
$this->getRemovedVersion($removed),
|
||||||
$this->getReplacement($constant),
|
$this->getReplacement($removed),
|
||||||
$this->getDocsUrl($constant),
|
$this->getDocsUrl($removed),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ abstract class AbstractGenericUsage implements PhpCsSniff
|
||||||
/**
|
/**
|
||||||
* Allow user to lookup the official docs related to this deprecation / breaking change.
|
* Allow user to lookup the official docs related to this deprecation / breaking change.
|
||||||
*
|
*
|
||||||
* @param array $config The converted structure for a single constant.
|
* @param array $config
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue