Updated ForumTopic
This commit is contained in:
parent
d386d1a553
commit
c1eec26a2c
1 changed files with 12 additions and 28 deletions
|
@ -7,25 +7,10 @@
|
|||
|
||||
class ForumTopic implements ObjectTypeInterface
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $message_thread_id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $icon_color;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $icon_custom_emoji_id;
|
||||
private int $message_thread_id;
|
||||
private string $name;
|
||||
private int $icon_color;
|
||||
private ?string $icon_custom_emoji_id;
|
||||
|
||||
/**
|
||||
* Unique identifier of the forum topic
|
||||
|
@ -68,9 +53,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns an array representation of the object
|
||||
*
|
||||
* @return array
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
|
@ -83,15 +66,16 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs object from an array representation
|
||||
*
|
||||
* @param array $data
|
||||
* @return ForumTopic
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): self
|
||||
public static function fromArray(?array $data): ?ForumTopic
|
||||
{
|
||||
$object = new self();
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->message_thread_id = $data['message_thread_id'] ?? null;
|
||||
$object->name = $data['name'] ?? null;
|
||||
$object->icon_color = $data['icon_color'] ?? null;
|
||||
|
|
Loading…
Add table
Reference in a new issue