Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MultiConstraint.php

function MultiConstraint::extractBounds

Return value

void

2 calls to MultiConstraint::extractBounds()
MultiConstraint::getLowerBound in vendor/composer/semver/src/Constraint/MultiConstraint.php
MultiConstraint::getUpperBound in vendor/composer/semver/src/Constraint/MultiConstraint.php

File

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

Class

MultiConstraint
Defines a conjunctive or disjunctive set of constraints.

Namespace

Composer\Semver\Constraint

Code

private function extractBounds() {
    if (null !== $this->lowerBound) {
        return;
    }
    foreach ($this->constraints as $constraint) {
        if (null === $this->lowerBound || null === $this->upperBound) {
            $this->lowerBound = $constraint->getLowerBound();
            $this->upperBound = $constraint->getUpperBound();
            continue;
        }
        if ($constraint->getLowerBound()
            ->compareTo($this->lowerBound, $this->isConjunctive() ? '>' : '<')) {
            $this->lowerBound = $constraint->getLowerBound();
        }
        if ($constraint->getUpperBound()
            ->compareTo($this->upperBound, $this->isConjunctive() ? '<' : '>')) {
            $this->upperBound = $constraint->getUpperBound();
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal