Code Duplication    Length = 11-13 lines in 2 locations

src/BotApi.php 2 locations

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