protected function checkGithubRepositoryVersion($dependency, $version)
    {
        if (preg_match('/^[A-Za-z0-9\-_]+\/[A-Za-z0-9\-_.]+/', $version)) {
            $pos = strpos($version, '#');
            $pos = false === $pos ? \strlen($version) : $pos;
            $realVersion = substr($version, $pos);
            $version = 'git://github.com/'.substr($version, 0, $pos).'.git'.$realVersion;
        }

        return array($dependency, $version);
    }
protected function checkGithubRepositoryVersion($dependency, $version)
    {
        if (preg_match('/^[A-Za-z0-9\-_]+\/[A-Za-z0-9\-_.]+/', $version)) {
            $pos = strpos($version, '#');
            $pos = false === $pos ? \strlen($version) : $pos;
            $realVersion = substr($version, $pos);
            $version = 'git://github.com/'.substr($version, 0, $pos).'.git'.$realVersion;
        }

        return array($dependency, $version);
    }
protected function checkGithubRepositoryVersion ( $ dependency , $ version ) { if ( preg_match ( '/^[A-Za-z0-9\-_]+\/[A-Za-z0-9\-_.]+/' , $ version ) ) { $ pos = strpos ( $ version , '#' ) ; $ pos = false === $ pos ? \ strlen ( $ version ) : $ pos ; $ realVersion = substr ( $ version , $ pos ) ; $ version = 'git://github.com/' . substr ( $ version , 0 , $ pos ) . '.git' . $ realVersion ; } return array ( $ dependency , $ version ) ; }
Checks if the version is a Github alias version of repository.

@param string $dependency The dependency
@param string $version    The version

@return string[] The new dependency and the new version
Checks if the version is a Github alias version of repository .