Updated InputMessageContent objects
This commit is contained in:
parent
9dd11af87d
commit
aaacd8851e
5 changed files with 30 additions and 9 deletions
|
@ -227,8 +227,13 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): InputVenueMessageContent
|
||||
public static function fromArray(?array $data): ?InputVenueMessageContent
|
||||
{
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->type = InputMessageContentType::VENUE;
|
||||
$object->latitude = (float)$data['latitude'] ?? null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue