Addressed coding standard issues reported by @stof
parent
e1370be7a0
commit
d05f0a6e40
|
@ -21,7 +21,6 @@ use Composer\Package\PackageInterface;
|
||||||
*/
|
*/
|
||||||
class CompositeRepository implements RepositoryInterface
|
class CompositeRepository implements RepositoryInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of repositories
|
* List of repositories
|
||||||
* @var array
|
* @var array
|
||||||
|
@ -38,8 +37,7 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (non-PHPdoc)
|
* {@inheritdoc}
|
||||||
* @see Composer\Repository.RepositoryInterface::hasPackage()
|
|
||||||
*/
|
*/
|
||||||
public function hasPackage(PackageInterface $package)
|
public function hasPackage(PackageInterface $package)
|
||||||
{
|
{
|
||||||
|
@ -53,10 +51,10 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (non-PHPdoc)
|
* {@inheritdoc}
|
||||||
* @see Composer\Repository.RepositoryInterface::findPackage()
|
|
||||||
*/
|
*/
|
||||||
public function findPackage($name, $version) {
|
public function findPackage($name, $version)
|
||||||
|
{
|
||||||
foreach ($this->repositories as $repository) {
|
foreach ($this->repositories as $repository) {
|
||||||
/* @var $repository RepositoryInterface */
|
/* @var $repository RepositoryInterface */
|
||||||
$package = $repository->findPackage($name, $version);
|
$package = $repository->findPackage($name, $version);
|
||||||
|
@ -68,8 +66,7 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (non-PHPdoc)
|
* {@inheritdoc}
|
||||||
* @see Composer\Repository.RepositoryInterface::findPackagesByName()
|
|
||||||
*/
|
*/
|
||||||
public function findPackagesByName($name)
|
public function findPackagesByName($name)
|
||||||
{
|
{
|
||||||
|
@ -82,8 +79,7 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (non-PHPdoc)
|
* {@inheritdoc}
|
||||||
* @see Composer\Repository.RepositoryInterface::getPackages()
|
|
||||||
*/
|
*/
|
||||||
public function getPackages()
|
public function getPackages()
|
||||||
{
|
{
|
||||||
|
@ -96,17 +92,7 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a repository.
|
* {@inheritdoc}
|
||||||
* @param RepositoryInterface $repository
|
|
||||||
*/
|
|
||||||
public function addRepository(RepositoryInterface $repository)
|
|
||||||
{
|
|
||||||
$this->repositories[] = $repository;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* (non-PHPdoc)
|
|
||||||
* @see Countable::count()
|
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count()
|
||||||
{
|
{
|
||||||
|
@ -117,4 +103,13 @@ class CompositeRepository implements RepositoryInterface
|
||||||
}
|
}
|
||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a repository.
|
||||||
|
* @param RepositoryInterface $repository
|
||||||
|
*/
|
||||||
|
public function addRepository(RepositoryInterface $repository)
|
||||||
|
{
|
||||||
|
$this->repositories[] = $repository;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue