protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { parent::addAlias($use, $type, $prefix); if ($type == Stmt\Use_::TYPE_NORMAL) { // Add prefix for group uses $name = strval($prefix ? Name::concat($prefix, $use->name) : $use->name); $this->classAliases[$use->alias] = $name; } }
protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { parent::addAlias($use, $type, $prefix); $aliasName = $use->alias; $type |= $use->type; if (isset($this->aliases[$type][$aliasName])) { $this->namespaceAliases[$aliasName] = (string) $this->aliases[$type][$aliasName]; } elseif (isset($this->aliases[$type][strtolower($aliasName)])) { $this->namespaceAliases[$aliasName] = (string) $this->aliases[$type][strtolower($aliasName)]; } }