/** * This method removes all variables from the <b>$_images</b> property that * are also found in the formal parameters of the given method or/and * function node. * * @param PHP_PMD_Node_AbstractCallable $node The currently * analyzed method/function node. * * @return void */ private function _removeParameters(PHP_PMD_Node_AbstractCallable $node) { // Get formal parameter container $parameters = $node->getFirstChildOfType('FormalParameters'); // Now get all declarators in the formal parameters container $declarators = $parameters->findChildrenOfType('VariableDeclarator'); foreach ($declarators as $declarator) { unset($this->_images[$declarator->getImage()]); } }