allow null values for private comment

This commit is contained in:
Julien Fastré 2022-05-30 10:01:27 +02:00
parent 7fb0e44307
commit 679d19e2a1

View File

@ -54,9 +54,9 @@ class PrivateCommentEmbeddable
return $this;
}
public function setCommentForUser(User $user, string $content): self
public function setCommentForUser(User $user, ?string $content): self
{
$this->comments[$user->getId()] = trim($content);
$this->comments[$user->getId()] = trim((string) $content);
return $this;
}