Code Duplication    Length = 11-13 lines in 2 locations

src/BotApi.php 2 locations

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