1
0
Fork 0

don't return useless info

pull/29/head
everzet 2011-09-29 02:01:06 +03:00
parent fda206400a
commit cc740249ff
1 changed files with 4 additions and 4 deletions

View File

@ -81,8 +81,6 @@ class DownloadManager
* @param string $targetDir target dir
* @param Boolean $preferSource prefer installation from source
*
* @return string downloader type (source/dist)
*
* @throws InvalidArgumentException if package have no urls to download from
*/
public function download(PackageInterface $package, $targetDir, $preferSource = null)
@ -95,14 +93,16 @@ class DownloadManager
$downloader = $this->getDownloader($distType);
$package->setInstallationSource('dist');
$downloader->distDownload($package, $targetDir);
return 'dist';
return;
}
if ($sourceType) {
$downloader = $this->getDownloader($sourceType);
$package->setInstallationSource('source');
$downloader->sourceDownload($package, $targetDir);
return 'source';
return;
}
throw new \InvalidArgumentException('Package should have dist or source specified');