1
0
Fork 0

tiny refactorings

pull/2445/head
Robert Schönthal 2013-11-22 11:45:27 +01:00
parent 25d062ccb4
commit 325c57f30c
1 changed files with 5 additions and 2 deletions

View File

@ -56,8 +56,11 @@ EOT
if (!$package instanceof CompletePackageInterface) {
throw new InvalidArgumentException('package not found');
} elseif (filter_var($package->getSourceUrl(), FILTER_VALIDATE_URL)) {
$this->openBrowser($package->getSourceUrl());
}
if (filter_var($package->getSourceUrl(), FILTER_VALIDATE_URL)) {
$support = $package->getSupport();
$url = isset($support['source']) ? $support['source'] : $package->getSourceUrl();
$this->openBrowser($url);
} else {
$output->writeln('no valid source-url given for ' . $package->getName());
}