TASK: Rename removed function method
This commit is contained in:
parent
56d692bac7
commit
aa8ffab3fa
1 changed files with 7 additions and 9 deletions
|
@ -163,26 +163,26 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff
|
|||
}
|
||||
}
|
||||
|
||||
return $this->getRemovedFunction($functionName, $class, $isStatic) !== [];
|
||||
$this->detectRemovedFunctions($functionName, $class, $isStatic)
|
||||
|
||||
return $this->removedFunction !== [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all matching removed functions for given arguments.
|
||||
*
|
||||
* Also prepares functions for later usages in $this->removedFunction.
|
||||
* Detect removed functions for given arguments.
|
||||
*
|
||||
* @param string $functionName
|
||||
* @param string $className The last part of the class name, splitted by namespaces.
|
||||
* @param bool $isStatic
|
||||
*
|
||||
* @return array
|
||||
* @return void
|
||||
*/
|
||||
protected function getRemovedFunction($functionName, $className, $isStatic)
|
||||
protected function detectRemovedFunctions($functionName, $className, $isStatic)
|
||||
{
|
||||
// We will not match any static method, without the class name, at least for now.
|
||||
// Otherwise we could handle them the same way as instance methods.
|
||||
if ($isStatic === true && $className === false) {
|
||||
return [];
|
||||
return;
|
||||
}
|
||||
|
||||
$this->removedFunction = array_filter(
|
||||
|
@ -197,8 +197,6 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff
|
|||
;
|
||||
}
|
||||
);
|
||||
|
||||
return $this->removedFunction;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue