Update BotDescription

This commit is contained in:
netkas 2024-10-04 12:08:31 -04:00
parent 6e7536e3c4
commit 16b4ba587b

View file

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