Update BotDescription
This commit is contained in:
parent
6e7536e3c4
commit
16b4ba587b
1 changed files with 4 additions and 13 deletions
|
@ -8,10 +8,7 @@
|
||||||
|
|
||||||
class BotDescription implements ObjectTypeInterface
|
class BotDescription implements ObjectTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
private string $description;
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $description;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bot's short description
|
* The bot's short description
|
||||||
|
@ -24,9 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of the object
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @return string[]
|
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
|
@ -36,15 +31,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return BotDescription
|
|
||||||
*/
|
*/
|
||||||
public static function fromArray(array $data): self
|
public static function fromArray(?array $data): BotDescription
|
||||||
{
|
{
|
||||||
$object = new self();
|
$object = new self();
|
||||||
|
|
||||||
$object->description = $data['description'];
|
$object->description = $data['description'];
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
|
|
Loading…
Add table
Reference in a new issue