function GitHubDriver::getSource
@inheritDoc
Overrides VcsDriverInterface::getSource
File
-
vendor/
composer/ composer/ src/ Composer/ Repository/ Vcs/ GitHubDriver.php, line 127
Class
- GitHubDriver
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\Repository\VcsCode
public function getSource(string $identifier) : array {
if ($this->gitDriver) {
return $this->gitDriver
->getSource($identifier);
}
if ($this->isPrivate) {
// Private GitHub repositories should be accessed using the
// SSH version of the URL.
$url = $this->generateSshUrl();
}
else {
$url = $this->getUrl();
}
return [
'type' => 'git',
'url' => $url,
'reference' => $identifier,
];
}