mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-30 04:19:30 +01:00
Remove Node::setLine() method
This commit is contained in:
parent
56d57d472a
commit
92275bdfa8
@ -57,6 +57,8 @@ source code, while running on a newer version.
|
||||
* The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
|
||||
* The `NodeTraverser` no longer accepts `false` as a return value from a `leaveNode()` method.
|
||||
`NodeTraverser::REMOVE_NODE` should be returned instead.
|
||||
* The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
|
||||
instead.
|
||||
* The misspelled `Class_::VISIBILITY_MODIFER_MASK` constant has been dropped in favor of
|
||||
`Class_::VISIBILITY_MODIFIER_MASK`.
|
||||
* The XML serializer has been removed. As such, the classes `Serializer\XML`, and
|
||||
|
@ -25,15 +25,6 @@ interface Node
|
||||
*/
|
||||
public function getLine() : int;
|
||||
|
||||
/**
|
||||
* Sets line the node started in.
|
||||
*
|
||||
* @param int $line Line
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function setLine(int $line);
|
||||
|
||||
/**
|
||||
* Gets the doc comment of the node.
|
||||
*
|
||||
|
@ -33,17 +33,6 @@ abstract class NodeAbstract implements Node, \JsonSerializable
|
||||
return $this->getAttribute('startLine', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets line the node started in.
|
||||
*
|
||||
* @param int $line Line
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function setLine(int $line) {
|
||||
$this->setAttribute('startLine', (int) $line);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the doc comment of the node.
|
||||
*
|
||||
|
@ -98,10 +98,6 @@ class NodeAbstractTest extends TestCase
|
||||
* @dataProvider provideNodes
|
||||
*/
|
||||
public function testChange(array $attributes, Node $node) {
|
||||
// change of line
|
||||
$node->setLine(15);
|
||||
$this->assertSame(15, $node->getLine());
|
||||
|
||||
// direct modification
|
||||
$node->subNode = 'newValue';
|
||||
$this->assertSame('newValue', $node->subNode);
|
||||
|
Loading…
Reference in New Issue
Block a user