/** * Returns the first child of the given type or <b>null</b> when this node * has no child of the given type. * * @param string $type The searched child type. * @return \PHPMD\AbstractNode */ public function getFirstChildOfType($type) { $node = $this->node->getFirstChildOfType('PDepend\\Source\\AST\\AST' . $type); if ($node === null) { return null; } return new ASTNode($node, $this->getFileName()); }