Code Duplication    Length = 11-13 lines in 2 locations

src/BotApi.php 2 locations

@@ 950-962 (lines=13) @@
947
     * @throws \TelegramBot\Api\InvalidArgumentException
948
     * @throws \TelegramBot\Api\Exception
949
     */
950
    public function editMessageCaption(
951
        $chatId,
952
        $messageId,
953
        $caption = null,
954
        $replyMarkup = null
955
    ) {
956
        return Message::fromResponse($this->call('editMessageText', [
957
            'chat_id' => $chatId,
958
            'message_id' => $messageId,
959
            'caption' => $caption,
960
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
961
        ]));
962
    }
963
964
    /**
965
     * Use this method to edit only the reply markup of messages sent by the bot or via the bot
@@ 975-985 (lines=11) @@
972
     * @throws \TelegramBot\Api\InvalidArgumentException
973
     * @throws \TelegramBot\Api\Exception
974
     */
975
    public function editMessageReplyMarkup(
976
        $chatId,
977
        $messageId,
978
        $replyMarkup = null
979
    ) {
980
        return Message::fromResponse($this->call('editMessageText', [
981
            'chat_id' => $chatId,
982
            'message_id' => $messageId,
983
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
984
        ]));
985
    }
986
987
    /**
988
     * Close curl