From f3999360b8316c9dcbac26c78c20dd48a370ebf4 Mon Sep 17 00:00:00 2001 From: Yannick Gottschalk Date: Wed, 28 Jun 2023 02:04:45 +0200 Subject: [PATCH] Added stub for PhpParser\Node\Name --- stubs/phpparser.phpstub | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/stubs/phpparser.phpstub b/stubs/phpparser.phpstub index 856cd2feccc..9e59385721f 100644 --- a/stubs/phpparser.phpstub +++ b/stubs/phpparser.phpstub @@ -20,3 +20,26 @@ abstract class CallLike extends Expr { */ public function getArgs(): array {} } + + +namespace PhpParser\Node; + +use PhpParser\NodeAbstract; + +class Name extends NodeAbstract { + /** + * @param string|string[]|self $name + * @param array $attributes + */ + public function __construct($name, array $attributes = []) { + $this->attributes = $attributes; + $this->parts = self::prepareName($name); + } + + /** + * @return non-empty-list + */ + public function getParts(): array { + return $this->parts; + } +}