Code Duplication    Length = 13-15 lines in 4 locations

src/BotApi.php 4 locations

@@ 582-594 (lines=13) @@
579
     * @throws HttpException
580
     * @throws InvalidJsonException
581
     */
582
    public function stopMessageLiveLocation(
583
        $chatId,
584
        $messageId,
585
        $inlineMessageId,
586
        $replyMarkup = null
587
    ) {
588
        return Message::fromResponse($this->call('sendLocation', [
589
            'chat_id'           => $chatId,
590
            'message_id'        => $messageId,
591
            'inline_message_id' => $inlineMessageId,
592
            'reply_markup'      => $replyMarkup,
593
        ]));
594
    }
595
596
    /**
597
     * Use this method to send information about a venue. On success, the sent Message is returned.
@@ 1157-1171 (lines=15) @@
1154
        ]));
1155
    }
1156
1157
    public function editMessageMedia(
1158
        $chatId,
1159
        $messageId,
1160
        InputMedia $media,
1161
        $inlineMessageId = null,
1162
        $replyMarkup = null
1163
    ) {
1164
        return Message::fromResponse($this->call('editMessageMedia', [
1165
            'chat_id' => $chatId,
1166
            'message_id' => $messageId,
1167
            'inline_message_id' => $inlineMessageId,
1168
            'media' => $media->toJson(),
1169
            'reply_markup' => $replyMarkup,
1170
        ]));
1171
    }
1172
1173
    /**
1174
     * Use this method to edit only the reply markup of messages sent by the bot or via the bot
@@ 1186-1198 (lines=13) @@
1183
     * @throws HttpException
1184
     * @throws InvalidJsonException
1185
     */
1186
    public function editMessageReplyMarkup(
1187
        $chatId,
1188
        $messageId,
1189
        $replyMarkup = null,
1190
        $inlineMessageId = null
1191
    ) {
1192
        return Message::fromResponse($this->call('editMessageReplyMarkup', [
1193
            'chat_id' => $chatId,
1194
            'message_id' => $messageId,
1195
            'inline_message_id' => $inlineMessageId,
1196
            'reply_markup' => $replyMarkup,
1197
        ]));
1198
    }
1199
1200
    /**
1201
     * Use this method to delete a message, including service messages, with the following limitations:
@@ 1857-1871 (lines=15) @@
1854
     * @throws HttpException
1855
     * @throws InvalidJsonException
1856
     */
1857
    public function editMessageMedia(
1858
        $chatId,
1859
        $messageId,
1860
        InputMedia $media,
1861
        $replyMarkup = null,
1862
        $inlineMessageId = null
1863
    ) {
1864
        return Message::fromResponse($this->call('editMessageMedia', [
1865
            'chat_id' => $chatId,
1866
            'message_id' => $messageId,
1867
            'media' => $media->toJson(),
1868
            'inline_message_id' => $inlineMessageId,
1869
            'reply_markup' => $replyMarkup,
1870
        ]));
1871
    }
1872
1873
    /**
1874
     * Use this method to send a native poll. A native poll can't be sent to a private chat.