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