chat_id; } /** * @inheritDoc */ public function toArray(): array { return [ 'type' => $this->type->value, 'chat_id' => $this->chat_id ]; } /** * @inheritDoc */ public static function fromArray(array $data): self { $object = new self(); $object->type = BotCommandScopeType::CHAT; $object->chat_id = $data['chat_id'] ?? null; return $object; } }