| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class UpdateMessageLiveLocationViewed extends Update |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'updateMessageLiveLocationViewed'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Identifier of the chat with the live location message. |
||
| 20 | * |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | protected int $chatId; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Identifier of the message with live location. |
||
| 27 | * |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | protected int $messageId; |
||
| 31 | |||
| 32 | public function __construct(int $chatId, int $messageId) |
||
| 33 | { |
||
| 34 | parent::__construct(); |
||
| 35 | |||
| 36 | $this->chatId = $chatId; |
||
| 37 | $this->messageId = $messageId; |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function fromArray(array $array): UpdateMessageLiveLocationViewed |
||
| 41 | { |
||
| 42 | return new static( |
||
| 43 | $array['chat_id'], |
||
| 44 | $array['message_id'], |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | public function typeSerialize(): array |
||
| 49 | { |
||
| 50 | return [ |
||
| 51 | '@type' => static::TYPE_NAME, |
||
| 52 | 'chat_id' => $this->chatId, |
||
| 53 | 'message_id' => $this->messageId, |
||
| 54 | ]; |
||
| 55 | } |
||
| 56 | |||
| 57 | public function getChatId(): int |
||
| 60 | } |
||
| 61 | |||
| 62 | public function getMessageId(): int |
||
| 65 | } |
||
| 66 | } |
||
| 67 |