Platformsh\Cli\Local\LocalProject::parseGitUrl PHP Method

parseGitUrl() protected method

protected parseGitUrl ( string $gitUrl ) : array | false
$gitUrl string
return array | false An array containing 'id' and 'host', or false on failure.
    protected function parseGitUrl($gitUrl)
    {
        if (!preg_match('/^([a-z0-9]{12,})@git\\.(([a-z\\-]+\\.)?' . preg_quote($this->config->get('detection.git_domain')) . '):\\1\\.git$/', $gitUrl, $matches)) {
            return false;
        }
        return ['id' => $matches[1], 'host' => $matches[2]];
    }