Gets the doc comment of the node.
null|Comment\Doc Doc comment object or null
Overrides Node::getDocComment
public function getDocComment() : ?Comment\Doc { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { $comment = $comments[$i]; if ($comment instanceof Comment\Doc) { return $comment; } } return null; }