mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
replace all occurences in code and comments
This commit is contained in:
parent
1ccfc8eb96
commit
a1427d7fd6
38 changed files with 124 additions and 122 deletions
|
@ -15,9 +15,9 @@ namespace Composer\Repository;
|
|||
use Composer\Package\AliasPackage;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Package\CompletePackageInterface;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Package\LinkConstraint\LinkConstraintInterface;
|
||||
use Composer\Package\LinkConstraint\VersionConstraint;
|
||||
use Composer\Semver\VersionParser;
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
/**
|
||||
* A repository implementation that simply stores packages in an array
|
||||
|
@ -43,14 +43,14 @@ class ArrayRepository implements RepositoryInterface
|
|||
{
|
||||
$name = strtolower($name);
|
||||
|
||||
if (!$constraint instanceof LinkConstraintInterface) {
|
||||
if (!$constraint instanceof ConstraintInterface) {
|
||||
$versionParser = new VersionParser();
|
||||
$constraint = $versionParser->parseConstraints($constraint);
|
||||
}
|
||||
|
||||
foreach ($this->getPackages() as $package) {
|
||||
if ($name === $package->getName()) {
|
||||
$pkgConstraint = new VersionConstraint('==', $package->getVersion());
|
||||
$pkgConstraint = new Constraint('==', $package->getVersion());
|
||||
if ($constraint->matches($pkgConstraint)) {
|
||||
return $package;
|
||||
}
|
||||
|
@ -67,14 +67,14 @@ class ArrayRepository implements RepositoryInterface
|
|||
$name = strtolower($name);
|
||||
$packages = array();
|
||||
|
||||
if (null !== $constraint && !$constraint instanceof LinkConstraintInterface) {
|
||||
if (null !== $constraint && !$constraint instanceof ConstraintInterface) {
|
||||
$versionParser = new VersionParser();
|
||||
$constraint = $versionParser->parseConstraints($constraint);
|
||||
}
|
||||
|
||||
foreach ($this->getPackages() as $package) {
|
||||
if ($name === $package->getName()) {
|
||||
$pkgConstraint = new VersionConstraint('==', $package->getVersion());
|
||||
$pkgConstraint = new Constraint('==', $package->getVersion());
|
||||
if (null === $constraint || $constraint->matches($pkgConstraint)) {
|
||||
$packages[] = $package;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue