Merge pull request #7364 from robbieaverill/pulls/1.6/phpdoc-fixes
FIX Update PHPDocs to indicate more specific return typespull/7382/head
commit
ccb4acaf3f
|
@ -54,6 +54,7 @@ class RepositoryManager
|
||||||
public function findPackage($name, $constraint)
|
public function findPackage($name, $constraint)
|
||||||
{
|
{
|
||||||
foreach ($this->repositories as $repository) {
|
foreach ($this->repositories as $repository) {
|
||||||
|
/** @var RepositoryInterface $repository */
|
||||||
if ($package = $repository->findPackage($name, $constraint)) {
|
if ($package = $repository->findPackage($name, $constraint)) {
|
||||||
return $package;
|
return $package;
|
||||||
}
|
}
|
||||||
|
@ -68,13 +69,13 @@ class RepositoryManager
|
||||||
* @param string $name package name
|
* @param string $name package name
|
||||||
* @param string|\Composer\Semver\Constraint\ConstraintInterface $constraint package version or version constraint to match against
|
* @param string|\Composer\Semver\Constraint\ConstraintInterface $constraint package version or version constraint to match against
|
||||||
*
|
*
|
||||||
* @return array
|
* @return PackageInterface[]
|
||||||
*/
|
*/
|
||||||
public function findPackages($name, $constraint)
|
public function findPackages($name, $constraint)
|
||||||
{
|
{
|
||||||
$packages = array();
|
$packages = array();
|
||||||
|
|
||||||
foreach ($this->repositories as $repository) {
|
foreach ($this->getRepositories() as $repository) {
|
||||||
$packages = array_merge($packages, $repository->findPackages($name, $constraint));
|
$packages = array_merge($packages, $repository->findPackages($name, $constraint));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +148,7 @@ class RepositoryManager
|
||||||
/**
|
/**
|
||||||
* Returns all repositories, except local one.
|
* Returns all repositories, except local one.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return RepositoryInterface[]
|
||||||
*/
|
*/
|
||||||
public function getRepositories()
|
public function getRepositories()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue