| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class UpdateChatUnreadMentionCount extends Update |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'updateChatUnreadMentionCount'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Chat identifier. |
||
| 20 | */ |
||
| 21 | protected int $chatId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The number of unread mention messages left in the chat. |
||
| 25 | */ |
||
| 26 | protected int $unreadMentionCount; |
||
| 27 | |||
| 28 | public function __construct(int $chatId, int $unreadMentionCount) |
||
| 34 | } |
||
| 35 | |||
| 36 | public static function fromArray(array $array): UpdateChatUnreadMentionCount |
||
| 37 | { |
||
| 38 | return new static( |
||
| 39 | $array['chat_id'], |
||
| 40 | $array['unread_mention_count'], |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function typeSerialize(): array |
||
| 45 | { |
||
| 46 | return [ |
||
| 47 | '@type' => static::TYPE_NAME, |
||
| 48 | 'chat_id' => $this->chatId, |
||
| 49 | 'unread_mention_count' => $this->unreadMentionCount, |
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getChatId(): int |
||
| 54 | { |
||
| 55 | return $this->chatId; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getUnreadMentionCount(): int |
||
| 61 | } |
||
| 62 | } |
||
| 63 |