getDependenciesNeededToInstall accepts an array to ease transition to handling multiple packages

This commit is contained in:
Flavio Copes
2016-03-09 19:40:23 +01:00
parent 7c3b39022a
commit 68a183c05c
2 changed files with 7 additions and 6 deletions

View File

@@ -523,21 +523,22 @@ class Admin
}
/**
* Get an array of dependencies needed to be installed or updated for a package
* Get an array of dependencies needed to be installed or updated for a list of packages
* to be installed.
*
* @param string $slug The package slug
* @param array $packages The packages slugs
*
* @return array|bool
*/
public function getDependenciesNeededToInstall($slug)
public function getDependenciesNeededToInstall($packages)
{
$gpm = $this->gpm();
if (!$gpm) {
return false;
}
$dependencies = $this->gpm->getDependencies([$slug]);
$dependencies = $this->gpm->getDependencies($packages);
return $dependencies;
}