Updated ForumTopicEdited

This commit is contained in:
netkas 2024-10-04 21:15:28 -04:00
parent 926ab06c51
commit 8d074ef36a

View file

@ -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;