Updated GiveawayCompleted

This commit is contained in:
netkas 2024-10-04 21:18:44 -04:00
parent 0a411cec79
commit 89d0165fb6

View file

@ -67,8 +67,13 @@ class GiveawayCompleted implements ObjectTypeInterface
/** /**
* @inheritDoc * @inheritDoc
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(?array $data): ?GiveawayCompleted
{ {
if($data === null)
{
return null;
}
$object = new self(); $object = new self();
$object->winner_count = $data['winner_count']; $object->winner_count = $data['winner_count'];
$object->unclaimed_prize_count = $data['unclaimed_prize_count'] ?? null; $object->unclaimed_prize_count = $data['unclaimed_prize_count'] ?? null;