Updated VideoChatEnded
This commit is contained in:
parent
d3c5bf4f51
commit
9a58bf51f4
1 changed files with 10 additions and 12 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue