public function MultiConstraint::matches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/composer/semver/src/Constraint/MultiConstraint.php \Composer\Semver\Constraint\MultiConstraint::matches()
Parameters
ConstraintInterface $provider:
Return value
bool
Overrides ConstraintInterface::matches
File
- vendor/
composer/ semver/ src/ Constraint/ MultiConstraint.php, line 43
Class
- MultiConstraint
- Defines a conjunctive or disjunctive set of constraints.
Namespace
Composer\Semver\ConstraintCode
public function matches(ConstraintInterface $provider) {
if (false === $this->conjunctive) {
foreach ($this->constraints as $constraint) {
if ($constraint
->matches($provider)) {
return true;
}
}
return false;
}
foreach ($this->constraints as $constraint) {
if (!$constraint
->matches($provider)) {
return false;
}
}
return true;
}