Skip to content

Commit 0d0accf

Browse files
committed
Add setDocComment() to Node interface
Previously it was only part of NodeAbstract.
1 parent 623bad2 commit 0d0accf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Version 3.0.0-dev
33

44
### Added
55

6-
* Added `NodeAbstract::setDocComment()` method.
6+
* Added `Node::setDocComment()` method.
77

88
Version 3.0.0-beta1 (2016-09-16)
99
--------------------------------

lib/PhpParser/Node.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ public function setLine($line);
4141
*/
4242
public function getDocComment();
4343

44+
/**
45+
* Sets the doc comment of the node.
46+
*
47+
* This will either replace an existing doc comment or add it to the comments array.
48+
*
49+
* @param Comment\Doc $docComment Doc comment to set
50+
*/
51+
public function setDocComment(Comment\Doc $docComment);
52+
4453
/**
4554
* Sets an attribute on a node.
4655
*

0 commit comments

Comments
 (0)