function PackageInfo::getViewSourceUrl
2 calls to PackageInfo::getViewSourceUrl()
- PackageInfo::getViewSourceOrHomepageUrl in vendor/
composer/ composer/ src/ Composer/ Util/ PackageInfo.php - ShowCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ ShowCommand.php - Executes the current command.
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ PackageInfo.php, line 20
Class
Namespace
Composer\UtilCode
public static function getViewSourceUrl(PackageInterface $package) : ?string {
if ($package instanceof CompletePackageInterface && isset($package->getSupport()['source']) && '' !== $package->getSupport()['source']) {
return $package->getSupport()['source'];
}
return $package->getSourceUrl();
}