Updated VideoChatEnded

This commit is contained in:
netkas 2024-10-06 16:03:12 -04:00
parent d3c5bf4f51
commit 9a58bf51f4

View file

@ -6,10 +6,7 @@
class VideoChatEnded implements ObjectTypeInterface class VideoChatEnded implements ObjectTypeInterface
{ {
/** private int $duration;
* @var int
*/
private $duration;
/** /**
* Video chat duration in seconds * Video chat duration in seconds
@ -22,9 +19,7 @@
} }
/** /**
* Returns an array representation of the object * @inheritDoc
*
* @return array
*/ */
public function toArray(): array public function toArray(): array
{ {
@ -34,15 +29,18 @@
} }
/** /**
* Constructs object from an array representation * @inheritDoc
*
* @param array $data
* @return VideoChatEnded
*/ */
public static function fromArray(array $data): self public static function fromArray(?array $data): ?VideoChatEnded
{ {
if($data === null)
{
return null;
}
$object = new self(); $object = new self();
$object->duration = $data['duration']; $object->duration = $data['duration'];
return $object; return $object;
} }