mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Remove deprecated Comment methods
This commit is contained in:
parent
574665b45b
commit
7ff12b8fcb
@ -30,17 +30,6 @@ class Comment
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the comment text.
|
||||
*
|
||||
* @param string $text The comment text (including comment delimiters like /*)
|
||||
*
|
||||
* @deprecated Construct a new comment instead
|
||||
*/
|
||||
public function setText($text) {
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line number the comment started on.
|
||||
*
|
||||
@ -50,17 +39,6 @@ class Comment
|
||||
return $this->line;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the line number the comment started on.
|
||||
*
|
||||
* @param int $line Line number
|
||||
*
|
||||
* @deprecated Construct a new comment instead
|
||||
*/
|
||||
public function setLine($line) {
|
||||
$this->line = $line;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the file offset the comment started on.
|
||||
*
|
||||
|
@ -11,13 +11,6 @@ class CommentTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame('/* Some comment */', (string) $comment);
|
||||
$this->assertSame(1, $comment->getLine());
|
||||
$this->assertSame(10, $comment->getFilePos());
|
||||
|
||||
$comment->setText('/* Some other comment */');
|
||||
$comment->setLine(10);
|
||||
|
||||
$this->assertSame('/* Some other comment */', $comment->getText());
|
||||
$this->assertSame('/* Some other comment */', (string) $comment);
|
||||
$this->assertSame(10, $comment->getLine());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user