hasDriverLicense() && true !== $this->getConfirmTermsOfUse()) { $executionContext ->buildViolation('Bitte bestätige die KfZ-Nutzungsbedingungen.') ->atPath('confirmTermsOfUse') ->addViolation() ; } } public function __construct(?bool $hasDriverLicense = null) { $this->hasDriverLicense = $hasDriverLicense; } public function hasDriverLicense(): ?bool { return $this->hasDriverLicense; } public function setHasDriverLicense(?bool $hasDriverLicense): static { $this->hasDriverLicense = $hasDriverLicense; return $this; } public function getConfirmTermsOfUse(): ?bool { return $this->confirmTermsOfUse; } public function setConfirmTermsOfUse(?bool $confirmTermsOfUse): static { $this->confirmTermsOfUse = $confirmTermsOfUse; return $this; } }