1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-22 13:51:12 +01:00

Deprecate setters on Comment

No point in making it mutable
This commit is contained in:
Nikita Popov 2016-04-02 07:55:28 +09:00
parent 15a2388d75
commit 60f01bdd86

View File

@ -34,6 +34,8 @@ class Comment
* Sets the comment text. * Sets the comment text.
* *
* @param string $text The comment text (including comment delimiters like /*) * @param string $text The comment text (including comment delimiters like /*)
*
* @deprecated Construct a new comment instead
*/ */
public function setText($text) { public function setText($text) {
$this->text = $text; $this->text = $text;
@ -52,6 +54,8 @@ class Comment
* Sets the line number the comment started on. * Sets the line number the comment started on.
* *
* @param int $line Line number * @param int $line Line number
*
* @deprecated Construct a new comment instead
*/ */
public function setLine($line) { public function setLine($line) {
$this->line = $line; $this->line = $line;