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