You are here

class EmptyConstraint in Automatic Updates 7

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 (string) $this;
  }

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

}

Members