Code Duplication    Length = 15-17 lines in 2 locations

src/BotApi.php 2 locations

@@ 578-594 (lines=17) @@
575
     *        Types\ReplyKeyboardRemove|null $replyMarkup
576
     * @return \TelegramBot\Api\Types\Message
577
     */
578
    public function editMessageLiveLocation(
579
        $chatId,
580
        $messageId,
581
        $inlineMessageId,
582
        $latitude,
583
        $longitude,
584
        $replyMarkup = null
585
    ) {
586
        return Message::fromResponse($this->call('sendLocation', [
587
            'chat_id'           => $chatId,
588
            'message_id'        => $messageId,
589
            'inline_message_id' => $inlineMessageId,
590
            'latitude'          => $latitude,
591
            'longitude'         => $longitude,
592
            'reply_markup'      => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
593
        ]));
594
    }
595
596
    /**
597
     * Use this method to stop updating a live location message sent by the bot or via the bot (for inline bots) before
@@ 1193-1207 (lines=15) @@
1190
     * @throws HttpException
1191
     * @throws InvalidJsonException
1192
     */
1193
    public function editMessageMedia(
1194
        $chatId,
1195
        $messageId,
1196
        InputMedia $media,
1197
        $inlineMessageId = null,
1198
        $replyMarkup = null
1199
    ) {
1200
        return Message::fromResponse($this->call('editMessageMedia', [
1201
            'chat_id' => $chatId,
1202
            'message_id' => $messageId,
1203
            'inline_message_id' => $inlineMessageId,
1204
            'media' => $media->toJson(),
1205
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
1206
        ]));
1207
    }
1208
1209
    /**
1210
     * Use this method to edit only the reply markup of messages sent by the bot or via the bot