/** * Searches recursive for all children of this node that are of the given * type. * * @param string $type The searched child type. * * @return array(PHP_PMD_AbstractNode) */ public function findChildrenOfType($type) { $children = $this->_node->findChildrenOfType('PHP_Depend_Code_AST' . $type); $nodes = array(); foreach ($children as $child) { $nodes[] = new PHP_PMD_Node_ASTNode($child, $this->getFileName()); } return $nodes; }