Code Duplication    Length = 11-13 lines in 2 locations

src/BotApi.php 2 locations

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