Updated VideoChatScheduled

This commit is contained in:
netkas 2024-10-06 16:04:40 -04:00
parent 40816a586f
commit af6cab91f7

View file

@ -7,10 +7,7 @@
class VideoChatScheduled implements ObjectTypeInterface class VideoChatScheduled implements ObjectTypeInterface
{ {
/** private int $start_date;
* @var int
*/
private $start_date;
/** /**
* Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator * Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator
@ -23,9 +20,7 @@
} }
/** /**
* Returns an array representation of the object * @inheritDoc
*
* @return array
*/ */
public function toArray(): array public function toArray(): array
{ {
@ -35,15 +30,18 @@
} }
/** /**
* Constructs object from an array representation * @inheritDoc
*
* @param array $data
* @return VideoChatScheduled
*/ */
public static function fromArray(array $data): self public static function fromArray(?array $data): ?VideoChatScheduled
{ {
if($data === null)
{
return null;
}
$object = new self(); $object = new self();
$object->start_date = $data['start_date']; $object->start_date = $data['start_date'];
return $object; return $object;
} }
} }