@param Constraint $provider
@param bool $compareBranches

@return bool
344954
public function matchSpecific(Constraint $provider, $compareBranches = false)
    {
        $noEqualOp = str_replace('=', '', self::$transOpInt[$this->operator]);
        $providerNoEqualOp = str_replace('=', '', self::$transOpInt[$provider->operator]);

        $isEqualOp = self::OP_EQ === $this->operator;
        $isNonEqualOp = self::OP_NE === $this->operator;
        $isProviderEqualOp = self::OP_EQ === $provider->operator;
        $isProviderNonEqualOp = self::OP_NE === $provider->operator;

        // '!=' operator is match when other operator is not '==' operator or version is not match
        // these kinds of comparisons always have a solution
        if ($isNonEqualOp || $isProviderNonEqualOp) {
            return !$isEqualOp && !$isProviderEqualOp
                || $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
        }

        // an example for the condition is <= 2.0 & < 1.0
        // these kinds of comparisons always have a solution
        if ($this->operator !== self::OP_EQ && $noEqualOp === $providerNoEqualOp) {
            return true;
        }

        if ($this->versionCompare($provider->version, $this->version, self::$transOpInt[$this->operator], $compareBranches)) {
            // special case, e.g. require >= 1.0 and provide < 1.0
            // 1.0 >= 1.0 but 1.0 is outside of the provided interval
            if ($provider->version === $this->version
                && self::$transOpInt[$provider->operator] === $providerNoEqualOp
                && self::$transOpInt[$this->operator] !== $noEqualOp) {
                return false;
            }

            return true;
        }

        return false;
    }
3883
protected function getComparisonValue($validator, $comparisonField)
    {
        $comparisonFieldValue = isset($validator->getData()[$comparisonField]) ? $validator->getData()[$comparisonField] : null;
        return $comparisonFieldValue;
    }
889444
public function Execute( $provider, $dataPool )
	{
		if ( CoreFuncs::BooleanValue( $this->getAbstractNode(0)->Execute( $provider, $dataPool ) ) instanceof TrueValue )
			return $this->getAbstractNode(1)->Execute( $provider, $dataPool );
		else
			return $this->getAbstractNode(2)->Execute( $provider, $dataPool );
	}
1024444
protected function findAllForClass(&$providers, $findClass)
    {

        $all = [];

        foreach ($providers as $class=>$provider) {
            if (is_subclass_of($findClass, $class) || $findClass == $class) {
                $all[$class] = $provider;
            }
        }

        return $all;

    }
271573
public function isEqual(Collection $collection, $compareFunction) {
    // ungleiche Anzahl ist nie gleich => fastcheck
    if (count($this) !== count($collection)) return FALSE;

    if (count($this->insertDiff($collection, $compareFunction)) > 0) return FALSE;
    if (count($this->deleteDiff($collection, $compareFunction)) > 0) return FALSE;
    
    return TRUE;
  }
758070
public static void compareGroup(ProviderGroup oldGroup, ProviderGroup newGroup,
                                    List<ProviderInfo> add, List<ProviderInfo> remove) {
        compareProviders(oldGroup.getProviderInfos(), newGroup.getProviderInfos(), add, remove);
    }
383952
public function validate ($entity, Constraint $constraint)
    {
        if (!$entity instanceof ClientBillingAddressInterface) {
            throw new \InvalidArgumentException('Expected instance of ClientBillingAddressInterface');
        }
        
        if (false === $entity->isCompanyAddress()) {
            return;
        }
        
        if ($this->context instanceof ExecutionContextInterface) {
            
            if (false === $this->isValidCompanyName($entity)) {
                $this->context->buildViolation('client.company_name_not_valid')->atPath('companyName')->addViolation();
            }
            
            if (false === $this->isValidVatId($entity)) {
                $this->context->buildViolation('client.vatid_not_valid')->atPath('vatId')->addViolation();
            }
        }
    }
1255022
public static function compare($compare1, $operator, $compare2, $strict = false)
    {
        $operator = trim(strtolower($operator));

        switch ($operator) {
            case '=':
            case '==':
            case 'eq':
                return $strict ? $compare1 === $compare2 : $compare1 == $compare2;
                break;

            case '===':
                return $compare1 === $compare2;
                break;

            case '!=':
            case 'neq':
                return $strict ? $compare1 !== $compare2 : $compare1 != $compare2;
                break;

            case '!==':
                return $compare1 !== $compare2;
                break;

            case '>':
            case 'gt':
                return $compare1 > $compare2;
                break;

            case '>=':
            case 'gte':
                return $compare1 >= $compare2;
                break;

            case '<':
            case 'lt':
                return $compare1 < $compare2;
                break;

            case '<=':
            case 'lte':
                return $compare1 <= $compare2;
                break;

            case 'in':
                return in_array($compare1, static::toArray($compare2), $strict);
                break;

            case 'not in':
            case 'not-in':
            case 'notin':
            case 'nin':
                return !in_array($compare1, static::toArray($compare2), $strict);
                break;

            default:
                throw new \InvalidArgumentException('Invalid compare operator: ' . $operator);
        }
    }
1138545
public function register($provider, $options = [], $force = false){
		if(!isset($this->providers[$provider]) || $force){
			$this->providers[$provider] = new $provider($this,$options);
			with($this->providers[$provider])->register();
		}
	}
1068110
public static function implies($constraintA, $constraintB) {
        return function ($features) use ($constraintA, $constraintB) {
            return !$constraintA($features) || $constraintB($features);
        };
    }
774682
public function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
	{
		$relation = $this->getHasRelationQuery($relation);

		$query = $relation->getRelationCountQuery($relation->getRelated()->newQuery(), $this);

		if ($callback) call_user_func($callback, $query);

		return $this->addHasWhere($query, $relation, $operator, $count, $boolean);
	}
1126773
protected function providerExists($provider)
    {
        return (
            array_key_exists($provider, $this->serviceMap) ||
            array_key_exists($provider, $this->config)
        );
    }
1361537
public ExpressionBuilder greaterThanOrEquals(final SubordinateTrigger trigger,
			final Object compare) {
		BooleanExpression exp = new CompareExpression(CompareType.GREATER_THAN_OR_EQUAL, trigger,
				compare);
		appendExpression(exp);

		return this;
	}
84082
public function is($key, $compareWith = true, $strictMode = false)
    {
        if (strpos($key, '.') === false) {
            $value = $this->get($key);
        } else {
            $value = $this->find($key);
        }

        if ($strictMode) {
            return $value === $compareWith;
        }

        /** @noinspection TypeUnsafeComparisonInspection */
        return $value == $compareWith;
    }
535518
public function requestComparisonStrategy(): ComparisonStrategy {
		if ($this->comparisonStrategy !== null) {
			return $this->comparisonStrategy;
		}
		
		$selectedQueryPoints = array_merge($this->queryModel->getNamedSelectQueryPoints(),
				$this->queryModel->getUnnamedSelectQueryPoints());
		if (1 != count($selectedQueryPoints)) {
			throw new CriteriaConflictException('Subselect not comparable.');
		}
		
		$comparisonStrategy = current($selectedQueryPoints)->requestComparisonStrategy();
		CastUtils::assertTrue($comparisonStrategy instanceof ComparisonStrategy);
		if ($comparisonStrategy->getType() != ComparisonStrategy::TYPE_COLUMN) {
			throw new CriteriaConflictException();
		}
		
		$columnComparable = $comparisonStrategy->getColumnComparable();
		
		$this->queryModel->getQueryItemSelect()->selectQueryItem($columnComparable
				->buildQueryItem(CriteriaComparator::OPERATOR_EQUAL));
		
		$selectBuilder  = $this->queryState->getPdo()->getMetaData()->createSelectStatementBuilder();
		$this->queryModel->apply($selectBuilder);
				
		return $this->comparisonStrategy = new ComparisonStrategy(new CriteriaColumnComparable(
				$selectBuilder->toQueryResult(), $columnComparable));
	}
110344
public function matches(ConstraintInterface $provider)
    {
        if (false === $this->conjunctive) {
            foreach ($this->constraints as $constraint) {
                if ($constraint->matches($provider)) {
                    return true;
                }
            }

            return false;
        }

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

        return true;
    }
1083996
public function checkProvider($provider)
    {
        if (($prv = $this->payload()->get('prv')) === null) {
            return true;
        }

        return $this->hashProvider($provider) === $prv;
    }