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

Breadcrumb

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

class MatchNoneConstraint

Blackhole of constraints, nothing escapes it

Hierarchy

  • class \Composer\Semver\Constraint\MatchNoneConstraint implements \Composer\Semver\Constraint\ConstraintInterface

Expanded class hierarchy of MatchNoneConstraint

2 files declare their use of MatchNoneConstraint
Intervals.php in vendor/composer/semver/src/Intervals.php
ValidatingArrayLoader.php in vendor/composer/composer/src/Composer/Package/Loader/ValidatingArrayLoader.php

File

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

Namespace

Composer\Semver\Constraint
View source
class MatchNoneConstraint implements ConstraintInterface {
    
    /** @var string|null */
    protected $prettyString;
    
    /**
     * @param ConstraintInterface $provider
     *
     * @return bool
     */
    public function matches(ConstraintInterface $provider) {
        return false;
    }
    
    /**
     * {@inheritDoc}
     */
    public function compile($otherOperator) {
        return 'false';
    }
    
    /**
     * {@inheritDoc}
     */
    public function setPrettyString($prettyString) {
        $this->prettyString = $prettyString;
    }
    
    /**
     * {@inheritDoc}
     */
    public function getPrettyString() {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return (string) $this;
    }
    
    /**
     * {@inheritDoc}
     */
    public function __toString() {
        return '[]';
    }
    
    /**
     * {@inheritDoc}
     */
    public function getUpperBound() {
        return new Bound('0.0.0.0-dev', false);
    }
    
    /**
     * {@inheritDoc}
     */
    public function getLowerBound() {
        return new Bound('0.0.0.0-dev', false);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
MatchNoneConstraint::$prettyString protected property @var string|null
MatchNoneConstraint::compile public function Provides a compiled version of the constraint for the given operator
The compiled version must be a PHP expression.
Executor of compile version must provide 2 variables:
Overrides ConstraintInterface::compile
MatchNoneConstraint::getLowerBound public function Overrides ConstraintInterface::getLowerBound
MatchNoneConstraint::getPrettyString public function Overrides ConstraintInterface::getPrettyString
MatchNoneConstraint::getUpperBound public function Overrides ConstraintInterface::getUpperBound
MatchNoneConstraint::matches public function Overrides ConstraintInterface::matches
MatchNoneConstraint::setPrettyString public function Overrides ConstraintInterface::setPrettyString
MatchNoneConstraint::__toString public function Overrides ConstraintInterface::__toString
RSS feed
Powered by Drupal