code: protected function validateDeliveryAddress(SaleInterface $sale, Constraint $constraint)
      {
          /** @var Sale $constraint */
          if (!$sale->isSameAddress() && null === $sale->getDeliveryAddress()) {
              $this->context
                  ->buildViolation($constraint->delivery_address_is_required)
                  ->atPath('deliveryAddress')
                  ->addViolation();
  
          } elseif ($sale->isSameAddress() && null !== $sale->getDeliveryAddress()) {
              $this->context
                  ->buildViolation($constraint->delivery_address_should_be_null)
                  ->atPath('deliveryAddress')
                  ->addViolation();
          }
      }
docs: Validates the delivery address.
  
  @param SaleInterface $sale
  @param Constraint    $constraint