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