public function addImport(string $importName): NamespaceContext
    {
        $importName = \trim($importName, '\\');
        
        if (false !== ($offset = \strrpos($importName, '\\'))) {
            $this->imports[\strtolower(\substr($importName, $offset + 1))] = $importName;
        } else {
            $this->imports[\strtolower($importName)] = $importName;
        }
        
        return $this;
    }
public function addImport(string $importName): NamespaceContext
    {
        $importName = \trim($importName, '\\');
        
        if (false !== ($offset = \strrpos($importName, '\\'))) {
            $this->imports[\strtolower(\substr($importName, $offset + 1))] = $importName;
        } else {
            $this->imports[\strtolower($importName)] = $importName;
        }
        
        return $this;
    }
public function addImport ( string $ importName ) : NamespaceContext { $ importName = \ trim ( $ importName , '\\' ) ; if ( false !== ( $ offset = \ strrpos ( $ importName , '\\' ) ) ) { $ this -> imports [ \ strtolower ( \ substr ( $ importName , $ offset + 1 ) ) ] = $ importName ; } else { $ this -> imports [ \ strtolower ( $ importName ) ] = $ importName ; } return $ this ; }
Add an import directive to the namespace context, the imported type is addressed using the local name.
Add an import directive to the namespace context the imported type is addressed using the local name .