Lines Matching refs:type
55 … public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { argument
57 if ($type === Stmt\Use_::TYPE_CONSTANT) {
63 if (isset($this->aliases[$type][$aliasLookupName])) {
73 $typeStringMap[$type], $name, $aliasName
80 $this->aliases[$type][$aliasLookupName] = $name;
81 $this->origAliases[$type][$aliasName] = $name;
101 public function getResolvedName(Name $name, int $type): ?Name { argument
103 if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) {
119 if (null !== $resolvedName = $this->resolveAlias($name, $type)) {
123 if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) {
156 public function getPossibleNames(string $name, int $type): array { argument
159 if ($type === Stmt\Use_::TYPE_NORMAL) {
169 if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) {
172 if (null === $this->resolveAlias($nsRelativeName, $type)) {
186 foreach ($this->origAliases[$type] as $alias => $orig) {
187 if ($type === Stmt\Use_::TYPE_CONSTANT) {
212 public function getShortName(string $name, int $type): Name { argument
213 $possibleNames = $this->getPossibleNames($name, $type);
229 private function resolveAlias(Name $name, int $type): ?FullyQualified { argument
241 $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart);
242 if (isset($this->aliases[$type][$checkName])) {
244 … return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes());
252 private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { argument
257 if ($type === Stmt\Use_::TYPE_CONSTANT) {