mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
commentembeddable: add a condition for the early return in normalisation
This commit is contained in:
parent
1a783e1881
commit
5e0a693108
@ -39,7 +39,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
|
|||||||
*/
|
*/
|
||||||
public function normalize($object, ?string $format = null, array $context = []): array
|
public function normalize($object, ?string $format = null, array $context = []): array
|
||||||
{
|
{
|
||||||
if (null === $object) {
|
if (null === $object or (null === $object->getComment() and null === $object->getUserId() and null === $object->getDate())) {
|
||||||
return [
|
return [
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
'isNull' => true,
|
'isNull' => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user