diff --git a/Model/PersonalData.php b/Model/PersonalData.php index f8f2e55..37c0dae 100644 --- a/Model/PersonalData.php +++ b/Model/PersonalData.php @@ -443,18 +443,15 @@ public function getRetainFor(): string /** * Set RetainFor. * - * @param \DateInterval $retainFor + * @param string $retainFor * - * @return PersonalData + * @return \SpecShaper\GdprBundle\Model\PersonalData + * @throws \Exception */ public function setRetainFor(string $retainFor): PersonalData { $interval = new \DateInterval($retainFor); - - if (0 == $interval->format('s')) { - throw new GdprException("RetainFor option period ". $retainFor . " is not a valid \DateTimeInterface duration string"); - } - + $this->retainFor = $interval; return $this;