From 16b4ba587b4cc551b87ce15c8f4c7999ed1ade83 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 4 Oct 2024 12:08:31 -0400 Subject: [PATCH] Update BotDescription --- src/TgBotLib/Objects/BotDescription.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/TgBotLib/Objects/BotDescription.php b/src/TgBotLib/Objects/BotDescription.php index da15a8a..3009112 100644 --- a/src/TgBotLib/Objects/BotDescription.php +++ b/src/TgBotLib/Objects/BotDescription.php @@ -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;