Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GitBitbucketDriver.php

function GitBitbucketDriver::parseCloneUrls

Parameters

array<array{name: string, href: string}> $cloneLinks:

1 call to GitBitbucketDriver::parseCloneUrls()
GitBitbucketDriver::getRepoData in vendor/composer/composer/src/Composer/Repository/Vcs/GitBitbucketDriver.php
Attempts to fetch the repository data via the BitBucket API and sets some parameters which are used in other methods

File

vendor/composer/composer/src/Composer/Repository/Vcs/GitBitbucketDriver.php, line 462

Class

GitBitbucketDriver
@author Per Bernhardt <plb@webfactory.de>

Namespace

Composer\Repository\Vcs

Code

protected function parseCloneUrls(array $cloneLinks) : void {
    foreach ($cloneLinks as $cloneLink) {
        if ($cloneLink['name'] === 'https') {
            // Format: https://(user@)bitbucket.org/{user}/{repo}
            // Strip username from URL (only present in clone URL's for private repositories)
            $this->cloneHttpsUrl = Preg::replace('/https:\\/\\/([^@]+@)?/', 'https://', $cloneLink['href']);
        }
    }
}
RSS feed
Powered by Drupal