1: <?php
2: namespace Pharborist;
3:
4: /**
5: * Contains the uncomment() method for line comments (they can't extend a single
6: * abstract base class because they're each based on a different node type).
7: */
8: trait UncommentTrait {
9: /**
10: * Uncomments the contents of this comment.
11: *
12: * @return Node
13: */
14: public function uncomment() {
15: /** @var CommentNode|LineCommentBlockNode $this */
16: return Parser::parseSnippet($this->getCommentText());
17: }
18: }
19: