public function getType(): ?string
{
return $this->type;
}
public function getText(): ?string
{
return $this->text;
}
public function getTs(): ?string
{
return $this->ts;
}
I have a question:
Is it a restrictive specification of the Symfony Serializer Component? Do setters force its returning types to always contain null?
If so, do we have to always apply assertions like this?: assert(is_string($type = $message->getType()));
It shows that the following fields are required.
text
type
ts
But the implementations are like this:
I have a question:
assert(is_string($type = $message->getType()));