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
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $description;
|
||||
private string $description;
|
||||
|
||||
/**
|
||||
* The bot's short description
|
||||
|
@ -24,9 +21,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns an array representation of the object
|
||||
*
|
||||
* @return string[]
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
|
@ -36,15 +31,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs object from an array representation
|
||||
*
|
||||
* @param array $data
|
||||
* @return BotDescription
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): self
|
||||
public static function fromArray(?array $data): BotDescription
|
||||
{
|
||||
$object = new self();
|
||||
|
||||
$object->description = $data['description'];
|
||||
|
||||
return $object;
|
||||
|
|
Loading…
Add table
Reference in a new issue