Bridge/Symfony/Validator/Constraints/AdjustmentValidator.php
public function validate($adjustment, Constraint $constraint)
    {
        if (null === $adjustment) {
            return;
        }

        if (!$adjustment instanceof AdjustmentInterface) {
            throw new UnexpectedTypeException($adjustment, AdjustmentInterface::class);
        }
        if (!$constraint instanceof Adjustment) {
            throw new UnexpectedTypeException($constraint, Adjustment::class);
        }

        if ($adjustment->getType() !== AdjustmentTypes::TYPE_DISCOUNT) {
            $violationList = $this
                ->context
                ->getValidator()
                ->validate($adjustment->getDesignation(), [new Assert\NotBlank()]);

            /** @var \Symfony\Component\Validator\ConstraintViolationInterface $violation */
            foreach ($violationList as $violation) {
                $this->context
                    ->buildViolation($violation->getMessage())
                    ->atPath('designation')
                    ->addViolation();
            }
        }
    }
public function validate($adjustment, Constraint $constraint)
    {
        if (null === $adjustment) {
            return;
        }

        if (!$adjustment instanceof AdjustmentInterface) {
            throw new UnexpectedTypeException($adjustment, AdjustmentInterface::class);
        }
        if (!$constraint instanceof Adjustment) {
            throw new UnexpectedTypeException($constraint, Adjustment::class);
        }

        if ($adjustment->getType() !== AdjustmentTypes::TYPE_DISCOUNT) {
            $violationList = $this
                ->context
                ->getValidator()
                ->validate($adjustment->getDesignation(), [new Assert\NotBlank()]);

            /** @var \Symfony\Component\Validator\ConstraintViolationInterface $violation */
            foreach ($violationList as $violation) {
                $this->context
                    ->buildViolation($violation->getMessage())
                    ->atPath('designation')
                    ->addViolation();
            }
        }
    }
{@inheritdoc}