You are here

public function MultiConstraint::matches in Automatic Updates 7

Parameters

ConstraintInterface $provider:

Return value

bool

Overrides ConstraintInterface::matches

File

vendor/composer/semver/src/Constraint/MultiConstraint.php, line 67

Class

MultiConstraint
Defines a conjunctive or disjunctive set of constraints.

Namespace

Composer\Semver\Constraint

Code

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;
}