src/Composer/Repository/Vcs/GitBitbucketDriver.php
public function getRootIdentifier()
    {
        if ($this->fallbackDriver) {
            return $this->fallbackDriver->getRootIdentifier();
        }

        if (null === $this->rootIdentifier) {
            if (! $this->getRepoData()) {
                return $this->fallbackDriver->getRootIdentifier();
            }

            if ($this->vcsType !== 'git') {
                throw new \RuntimeException(
                    $this->url.' does not appear to be a git repository, use '.
                    $this->cloneHttpsUrl.' if this is a mercurial bitbucket repository'
                );
            }

            $mainBranchData = $this->getMainBranchData();
            $this->rootIdentifier = !empty($mainBranchData['name']) ? $mainBranchData['name'] : 'master';
        }

        return $this->rootIdentifier;
    }
public function getRootIdentifier()
    {
        if ($this->fallbackDriver) {
            return $this->fallbackDriver->getRootIdentifier();
        }

        if (null === $this->rootIdentifier) {
            if (! $this->getRepoData()) {
                return $this->fallbackDriver->getRootIdentifier();
            }

            if ($this->vcsType !== 'git') {
                throw new \RuntimeException(
                    $this->url.' does not appear to be a git repository, use '.
                    $this->cloneHttpsUrl.' if this is a mercurial bitbucket repository'
                );
            }

            $mainBranchData = $this->getMainBranchData();
            $this->rootIdentifier = !empty($mainBranchData['name']) ? $mainBranchData['name'] : 'master';
        }

        return $this->rootIdentifier;
    }
public function getRootIdentifier ( ) { if ( $ this -> fallbackDriver ) { return $ this -> fallbackDriver -> getRootIdentifier ( ) ; } if ( null === $ this -> rootIdentifier ) { if ( ! $ this -> getRepoData ( ) ) { return $ this -> fallbackDriver -> getRootIdentifier ( ) ; } if ( $ this -> vcsType !== 'git' ) { throw new \ RuntimeException ( $ this -> url . ' does not appear to be a git repository, use ' . $ this -> cloneHttpsUrl . ' if this is a mercurial bitbucket repository' ) ; } $ mainBranchData = $ this -> getMainBranchData ( ) ; $ this -> rootIdentifier = ! empty ( $ mainBranchData [ 'name' ] ) ? $ mainBranchData [ 'name' ] : 'master' ; } return $ this -> rootIdentifier ; }
{@inheritDoc}
{