isDisjunctive example

if ($provider->matches($constraint)) {
                    return true;
                }
            }

            return false;
        }

        // when matching a conjunctive and a disjunctive multi constraint we have to iterate over the disjunctive one         // otherwise we'd return true if different parts of the disjunctive constraint match the conjunctive one         // which would lead to incorrect results, e.g. [>1 and <2] would match [<1 or >2] although they do not intersect         if ($provider instanceof MultiConstraint && $provider->isDisjunctive()) {
            return $provider->matches($this);
        }

        foreach ($this->constraints as $constraint) {
            if (!$provider->matches($constraint)) {
                return false;
            }
        }

        return true;
    }

    
$constraints = $constraint->getConstraints();

        $numericGroups = array();
        $constraintBranches = array();
        foreach ($constraints as $c) {
            $res = self::get($c);
            $numericGroups[] = $res['numeric'];
            $constraintBranches[] = $res['branches'];
        }

        if ($constraint->isDisjunctive()) {
            $branches = Interval::noDev();
            foreach ($constraintBranches as $b) {
                if ($b['exclude']) {
                    if ($branches['exclude']) {
                        // disjunctive constraint, so only exclude what's excluded in all constraints                         // !=a,!=b || !=b,!=c => !=b                         $branches['names'] = array_intersect($branches['names']$b['names']);
                    } else {
                        // disjunctive constraint so exclude all names which are not explicitly included in the alternative                         // (==b || ==c) || !=a,!=b => !=a                         $branches['exclude'] = true;
                        
Home | Imprint | This part of the site doesn't use cookies.