private function addToImportTable($alias, $functionOrConst, $namespaceNameParts, $contents, & $namespaceImportTable, & $functionImportTable, & $constImportTable):array
    {
        if ($alias !== null) {
            if ($functionOrConst === null) {
                // namespaces are case-insensitive
//                $alias = \strtolower($alias);
                $namespaceImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            } elseif ($functionOrConst->kind === TokenKind::FunctionKeyword) {
                // functions are case-insensitive
//                $alias = \strtolower($alias);
                $functionImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            } elseif ($functionOrConst->kind === TokenKind::ConstKeyword) {
                // constants are case-sensitive
                $constImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            }
            return array($namespaceImportTable, $functionImportTable, $constImportTable);
        }
        return array($namespaceImportTable, $functionImportTable, $constImportTable);
    }
private function addToImportTable($alias, $functionOrConst, $namespaceNameParts, $contents, & $namespaceImportTable, & $functionImportTable, & $constImportTable):array
    {
        if ($alias !== null) {
            if ($functionOrConst === null) {
                // namespaces are case-insensitive
//                $alias = \strtolower($alias);
                $namespaceImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            } elseif ($functionOrConst->kind === TokenKind::FunctionKeyword) {
                // functions are case-insensitive
//                $alias = \strtolower($alias);
                $functionImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            } elseif ($functionOrConst->kind === TokenKind::ConstKeyword) {
                // constants are case-sensitive
                $constImportTable[$alias] = ResolvedName::buildName($namespaceNameParts, $contents);
                return array($namespaceImportTable, $functionImportTable, $constImportTable);
            }
            return array($namespaceImportTable, $functionImportTable, $constImportTable);
        }
        return array($namespaceImportTable, $functionImportTable, $constImportTable);
    }
private function addToImportTable ( $ alias , $ functionOrConst , $ namespaceNameParts , $ contents , & $ namespaceImportTable , & $ functionImportTable , & $ constImportTable ) : array { if ( $ alias !== null ) { if ( $ functionOrConst === null ) { // namespaces are case-insensitive //                $alias = \strtolower($alias); $ namespaceImportTable [ $ alias ] = ResolvedName :: buildName ( $ namespaceNameParts , $ contents ) ; return array ( $ namespaceImportTable , $ functionImportTable , $ constImportTable ) ; } elseif ( $ functionOrConst -> kind === TokenKind :: FunctionKeyword ) { // functions are case-insensitive //                $alias = \strtolower($alias); $ functionImportTable [ $ alias ] = ResolvedName :: buildName ( $ namespaceNameParts , $ contents ) ; return array ( $ namespaceImportTable , $ functionImportTable , $ constImportTable ) ; } elseif ( $ functionOrConst -> kind === TokenKind :: ConstKeyword ) { // constants are case-sensitive $ constImportTable [ $ alias ] = ResolvedName :: buildName ( $ namespaceNameParts , $ contents ) ; return array ( $ namespaceImportTable , $ functionImportTable , $ constImportTable ) ; } return array ( $ namespaceImportTable , $ functionImportTable , $ constImportTable ) ; } return array ( $ namespaceImportTable , $ functionImportTable , $ constImportTable ) ; }
Add the alias and resolved name to the corresponding namespace, function, or const import table.
If the alias already exists, it will get replaced by the most recent using.

TODO - worth throwing an error here in stead?
Add the alias and resolved name to the corresponding namespace function or const import table . If the alias already exists it will get replaced by the most recent using .