From 13d8165da4a100e5a3460364a420df349c47c705 Mon Sep 17 00:00:00 2001 From: Netkas Date: Mon, 13 Feb 2023 20:25:22 -0500 Subject: [PATCH] Added \TgBotLib\Objects\BotCommandScope > BotCommandScopeChatAdministrators --- .../BotCommandScopeChatAdministrators.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/TgBotLib/Objects/BotCommandScope/BotCommandScopeChatAdministrators.php diff --git a/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeChatAdministrators.php b/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeChatAdministrators.php new file mode 100644 index 0000000..a1b5270 --- /dev/null +++ b/src/TgBotLib/Objects/BotCommandScope/BotCommandScopeChatAdministrators.php @@ -0,0 +1,52 @@ +type; + } + + /** + * Returns an array representation of the object + * + * @return array + */ + public function toArray(): array + { + return [ + 'type' => $this->type + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + + $object->type = $data['type']; + + return $object; + } + } \ No newline at end of file