X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FNodeAbstract.php;fp=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FNodeAbstract.php;h=1b757c7bc01dd15bc3c8a9ea916aea64b4cf4eff;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=62a96da118fea9b659e9416684b65ab38e3e95fb;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php index 62a96da11..1b757c7bc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -2,6 +2,8 @@ namespace PhpParser; +use PhpParser\Node; + abstract class NodeAbstract implements Node, \JsonSerializable { protected $attributes; @@ -21,7 +23,12 @@ abstract class NodeAbstract implements Node, \JsonSerializable * @return string Type of the node */ public function getType() { - return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_'); + $className = rtrim(get_class($this), '_'); + return strtr( + substr($className, strlen(Node::class) + 1), + '\\', + '_' + ); } /** @@ -37,6 +44,8 @@ abstract class NodeAbstract implements Node, \JsonSerializable * Sets line the node started in. * * @param int $line Line + * + * @deprecated */ public function setLine($line) { $this->setAttribute('startLine', (int) $line);