You are here

public function MultiConstraint::__toString in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/composer/semver/src/Constraint/MultiConstraint.php \Composer\Semver\Constraint\MultiConstraint::__toString()

Return value

string

Overrides ConstraintInterface::__toString

1 call to MultiConstraint::__toString()
MultiConstraint::getPrettyString in vendor/composer/semver/src/Constraint/MultiConstraint.php

File

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

Class

MultiConstraint
Defines a conjunctive or disjunctive set of constraints.

Namespace

Composer\Semver\Constraint

Code

public function __toString() {
  $constraints = array();
  foreach ($this->constraints as $constraint) {
    $constraints[] = (string) $constraint;
  }
  return '[' . implode($this->conjunctive ? ' ' : ' || ', $constraints) . ']';
}