Updated GiveawayWinners
This commit is contained in:
parent
0fedf2cc54
commit
6280b8c026
1 changed files with 6 additions and 2 deletions
|
@ -166,10 +166,14 @@ class GiveawayWinners implements ObjectTypeInterface
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): ObjectTypeInterface
|
||||
public static function fromArray(?array $data): ?GiveawayWinners
|
||||
{
|
||||
$object = new self();
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->chat = Chat::fromArray($data['chat']);
|
||||
$object->giveaway_message_id = $data['giveaway_message_id'];
|
||||
$object->winners_selection_date = $data['winners_selection_date'];
|
||||
|
|
Loading…
Add table
Reference in a new issue