We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Node::getLine()
Node::getStartLine()
1 parent 9356c18 commit a436917Copy full SHA for a436917
src/voku/SimplePhpParser/Model/BasePHPElement.php
@@ -97,6 +97,13 @@ protected static function getFQN($node): string
97
98
protected function prepareNode(Node $node): void
99
{
100
- $this->line = $node->getLine();
+ $this->line = method_exists($node, 'getStartLine')
101
+ ? $node->getStartLine()
102
+ /**
103
+ * Deprecated in PHP-Parser v5
104
+ *
105
+ * @see https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#miscellaneous-changes
106
+ */
107
+ : $node->getLine();
108
}
109
0 commit comments