Updated ForumTopicEdited
This commit is contained in:
parent
926ab06c51
commit
8d074ef36a
1 changed files with 10 additions and 18 deletions
|
@ -7,15 +7,8 @@
|
||||||
|
|
||||||
class ForumTopicEdited implements ObjectTypeInterface
|
class ForumTopicEdited implements ObjectTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
private ?string $name;
|
||||||
* @var string|null
|
private ?string $icon_custom_emoji_id;
|
||||||
*/
|
|
||||||
private $name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string|null
|
|
||||||
*/
|
|
||||||
private $icon_custom_emoji_id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. New name of the topic, if it was edited
|
* Optional. New name of the topic, if it was edited
|
||||||
|
@ -39,9 +32,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns array representation of object
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
|
@ -52,15 +43,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return ForumTopicEdited
|
|
||||||
*/
|
*/
|
||||||
public static function fromArray(array $data): self
|
public static function fromArray(?array $data): ?ForumTopicEdited
|
||||||
{
|
{
|
||||||
$object = new self();
|
if($data === null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$object = new self();
|
||||||
$object->name = $data['name'] ?? null;
|
$object->name = $data['name'] ?? null;
|
||||||
$object->icon_custom_emoji_id = $data['icon_custom_emoji_id'] ?? null;
|
$object->icon_custom_emoji_id = $data['icon_custom_emoji_id'] ?? null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue