Zend\Code\Scanner\ClassScanner::getVisibilityForAlias PHP Method

getVisibilityForAlias() protected method

Retrieve visibility for a given alias.
protected getVisibilityForAlias ( mixed $aliasName ) : string
$aliasName mixed
return string
    protected function getVisibilityForAlias($aliasName)
    {
        $this->scan();
        $return = null;
        foreach ($this->infos as $info) {
            if ($info['type'] !== 'use') {
                continue;
            }
            if (is_array($info['aliases'])) {
                foreach ($info['aliases'] as $alias) {
                    if (null === $alias && (!empty($alias['type']) && $alias['type'] !== 'as')) {
                        continue;
                    }
                    if ($alias['alias'] === $aliasName) {
                        $return = $alias['visibility'];
                        break 2;
                    }
                }
            }
        }
        return $return;
    }