reduce serialization of null models

This commit is contained in:
Dennis Eichhorn 2022-11-09 23:02:52 +01:00
parent dc9761d3a1
commit 0fddab6a3b
3 changed files with 24 additions and 0 deletions

View File

@ -35,4 +35,12 @@ final class NullComment extends Comment
{ {
$this->id = $id; $this->id = $id;
} }
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
} }

View File

@ -35,4 +35,12 @@ final class NullCommentList extends CommentList
{ {
$this->id = $id; $this->id = $id;
} }
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
} }

View File

@ -35,4 +35,12 @@ final class NullCommentVote extends CommentVote
{ {
$this->id = $id; $this->id = $id;
} }
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
} }