From 325c57f30c8cb2078b824f01f16a88679d3f5d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Scho=CC=88nthal?= Date: Fri, 22 Nov 2013 11:45:27 +0100 Subject: [PATCH] tiny refactorings --- src/Composer/Command/HomeCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Composer/Command/HomeCommand.php b/src/Composer/Command/HomeCommand.php index b1d3aac76..985ee61de 100644 --- a/src/Composer/Command/HomeCommand.php +++ b/src/Composer/Command/HomeCommand.php @@ -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()); }