Chris@0: type = $type; Chris@0: $this->name = $name; Chris@0: $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; Chris@0: } Chris@0: Chris@0: public function getSubNodeNames() : array { Chris@0: return ['type', 'name', 'alias']; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Get alias. If not explicitly given this is the last component of the used name. Chris@0: * Chris@0: * @return Identifier Chris@0: */ Chris@0: public function getAlias() : Identifier { Chris@0: if (null !== $this->alias) { Chris@0: return $this->alias; Chris@0: } Chris@0: Chris@0: return new Identifier($this->name->getLast()); Chris@0: } Chris@0: Chris@0: public function getType() : string { Chris@0: return 'Stmt_UseUse'; Chris@0: } Chris@0: }