You are here

class EmptyConstraint in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/semver/src/Constraint/EmptyConstraint.php \Composer\Semver\Constraint\EmptyConstraint

Defines the absence of a constraint.

Hierarchy

Expanded class hierarchy of EmptyConstraint

1 file declares its use of EmptyConstraint
VersionParser.php in vendor/composer/semver/src/VersionParser.php

File

vendor/composer/semver/src/Constraint/EmptyConstraint.php, line 17

Namespace

Composer\Semver\Constraint
View source
class EmptyConstraint implements ConstraintInterface {

  /** @var string */
  protected $prettyString;

  /**
   * @param ConstraintInterface $provider
   *
   * @return bool
   */
  public function matches(ConstraintInterface $provider) {
    return true;
  }

  /**
   * @param $prettyString
   */
  public function setPrettyString($prettyString) {
    $this->prettyString = $prettyString;
  }

  /**
   * @return string
   */
  public function getPrettyString() {
    if ($this->prettyString) {
      return $this->prettyString;
    }
    return $this
      ->__toString();
  }

  /**
   * @return string
   */
  public function __toString() {
    return '[]';
  }

}

Members