getCallingFrom(); $to = $value->getCallingTo(); if ((null === $from) !== (null === $to)) { $this->context->buildViolation($constraint->partialHours) ->atPath('callingFrom') ->addViolation(); return; } if (null !== $from && null !== $to && $to <= $from) { $this->context->buildViolation($constraint->toBeforeFrom) ->atPath('callingTo') ->addViolation(); } if ($value->getCallingTimezoneMode()->isFixed() && null === $value->getCallingTimezone()) { $this->context->buildViolation($constraint->timezoneRequired) ->atPath('callingTimezone') ->addViolation(); } } }