mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-30 04:19:30 +01:00
Merge branch '3.x'
Conflicts: lib/PhpParser/NodeAbstract.php
This commit is contained in:
commit
05e2cd287e
@ -21,7 +21,15 @@ abstract class NodeAbstract implements Node, \JsonSerializable
|
||||
* @return string Type of the node
|
||||
*/
|
||||
public function getType() : string {
|
||||
return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_');
|
||||
$className = rtrim(get_class($this), '_');
|
||||
return strtr(
|
||||
substr(
|
||||
$className,
|
||||
strpos($className, 'PhpParser\Node') + 15
|
||||
),
|
||||
'\\',
|
||||
'_'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user