Пример #1
0
 /**
  * This method extracts all parameters for the given function or method node
  * and it stores the parameter images in the <b>$_images</b> property.
  *
  * @param PHP_PMD_AbstractNode $node The context function/method node.
  *
  * @return void
  */
 private function _collectParameters(PHP_PMD_AbstractNode $node)
 {
     // First collect the formal parameters container
     $parameters = $node->getFirstChildOfType('FormalParameters');
     // Now get all declarators in the formal parameters container
     $declarators = $parameters->findChildrenOfType('VariableDeclarator');
     foreach ($declarators as $declarator) {
         $this->_nodes[$declarator->getImage()] = $declarator;
     }
 }