@param \Illuminate\Support\Fluent $constraint

@return bool
165921
public function isUniqueKey(Fluent $constraint)
    {
        $is = false;

        foreach ($this->unique as $index) {
            foreach ($index->columns as $column) {
                $is &= in_array($column, $constraint->columns);
            }
            if ($is) {
                return true;
            }
        }

        return $is;
    }
90546
public function validate($value, Constraint $constraint)
    {
        $url = $this->helper->getUrl($value);
        if($this->browser->get($url)->getStatusCode() >= 400) {
            $this->context->addViolation($constraint->message, array('%string%' => $url));
        }
    }
1254147
public function validate($data, Constraint $constraint)
    {
        $propertyPath = $this->context->getPropertyPath();
        $challengeField = $this->request->request->get('recaptcha_challenge_field');
        $responseField = $this->request->request->get('recaptcha_response_field');

        if (empty($challengeField) || empty($responseField)) {
            $this->context->addViolationAt($propertyPath, $constraint->emptyMessage);
        } elseif (false === $this->check($challengeField, $responseField)){ 
            $this->context->addViolationAt($propertyPath, $constraint->invalidMessage);
        }
    }
810023
public function visitRequiredConstraint(ObjectValue\RequiredConstraint $constraint)
    {
        $value = $this->currentValue();
        if (
            !$value instanceof Value\ObjectValue ||
            $value->has($constraint->property())
        ) {
            return $this->createResult();
        }

        return $this->createSingleIssueResult($constraint);
    }
143475
public function visitEnumConstraint(Generic\EnumConstraint $constraint)
    {
        $value = $this->currentValue();
        foreach ($constraint->values() as $enumValue) {
            if ($this->comparator()->equals($value, $enumValue)) {
                return $this->createResult();
            }
        }

        return $this->createSingleIssueResult($constraint);
    }
101853
public function isPrimaryKey(Fluent $command)
    {
        foreach ((array) $this->primaryKeys->columns as $column) {
            if (! in_array($column, $command->columns)) {
                return false;
            }
        }

        return true;
    }
892773
protected function hasPayloadDocKey(Constraint $constraint, string $documentationKey) : bool
    {
        return array_key_exists($documentationKey, $constraint->payload[self::PAYLOAD_DOCUMENTATION_KEY]);
    }
113503
public function validate($location, Constraint $constraint)
    {
        if (null === $location) {
            $this->context->addViolation($constraint->message);

            return;
        }

        $hasChildren = new HasChildren($this->locationService);

        if (!$hasChildren->isSatisfiedBy($location)) {
            $this->context->addViolation($constraint->message);
        }
    }
786123
protected function validateMaxWidth($width, Constraint $constraint)
    {
        if ($constraint->maxWidth) {
            if (!ctype_digit((string) $constraint->maxWidth)) {
                throw new ConstraintDefinitionException(
                    sprintf(
                        '"%s" is not a valid maximum width',
                        $constraint->maxWidth
                    )
                );
            }

            if ($width > $constraint->maxWidth) {
                $this->context->addViolation(
                    $constraint->maxWidthMessage,
                    array(
                        '{{ width }}' => $width,
                        '{{ max_width }}' => $constraint->maxWidth
                    )
                );

                return true;
            }
        }
    }
1351429
public function setConstraint($constraint) 
    {
        if (!$this->_isNumericArray($constraint)) {
            $constraint =  array ($constraint);    
        }
        $this->_fields['Constraint']['FieldValue'] = $constraint;
        return $this;
    }
1216579
public function visitTypeConstraint(Generic\TypeConstraint $constraint)
    {
        $valueTypes = array_map(function (ValueType $valueType) {
            return var_export($valueType->value(), true);
        }, $constraint->valueTypes());

        if (count($valueTypes) < 2) {
            return sprintf(
                'The value must be of type %s.',
                array_pop($valueTypes)
            );
        }

        return sprintf(
            'The value must be one of the following types: %s.',
            implode(', ', $valueTypes)
        );
    }
1193601
public function getTypeIfExist(Constraint $constraint)
    {
        return $this->hasPayloadDoc($constraint)
            ? $this->getPayloadDocValue($constraint, self::PAYLOAD_DOCUMENTATION_TYPE_KEY)
            : null
        ;
    }
446659
protected function _getPrimaryConstraint(Constraint\Primary $constraint)
    {
        $stm = parent::_getPrimaryConstraint($constraint);
        if ($this->_disablePrimaryConstraint) {
            $stm = null;
        }
        return $stm;
    }
1303735
public function validate($value, Constraint $constraint)
    {
        $result = $this->repository->hasOtherNodeWithSameParentAndOrder(
            $value->getParentId(),
            $value->getOrder(),
            $value->getNodeId(),
            $value->getSiteId()
        );

        if (true === $result) {
            $this->context->buildViolation($constraint->message)->addViolation();
        }
    }
162104
protected function validateDelimiter(Constraint $constraint)
    {
        if (strlen($constraint->delimiter) > 2) {
            throw new ConstraintDefinitionException(sprintf('"%s" is not a valid delimiter', $constraint->delimiter));
        }
    }
75129
public function visitPatternConstraint(StringValue\PatternConstraint $constraint)
    {
        $value = $this->currentValue();
        if (
            !$value instanceof Value\StringValue ||
            preg_match(
                $this->wrapPattern($constraint->pattern()),
                $value->value()
            )
        ) {
            return $this->createResult();
        }

        return $this->createSingleIssueResult($constraint);
    }
734596
public function transform(ConstraintInterface $constraint)
    {
        $this->clear();
        $this->setConstraint($constraint);
        $constraint = $constraint->accept($this);
        $this->clear();

        return $constraint;
    }