Code Duplication    Length = 15-15 lines in 2 locations

src/BotApi.php 2 locations

@@ 618-632 (lines=15) @@
615
     * @throws \TelegramBot\Api\InvalidArgumentException
616
     * @throws \TelegramBot\Api\Exception
617
     */
618
    public function sendSticker(
619
        $chatId,
620
        $sticker,
621
        $replyToMessageId = null,
622
        $replyMarkup = null,
623
        $disableNotification = false
624
    ) {
625
        return Message::fromResponse($this->call('sendSticker', [
626
            'chat_id' => $chatId,
627
            'sticker' => $sticker,
628
            'reply_to_message_id' => $replyToMessageId,
629
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
630
            'disable_notification' => (bool)$disableNotification,
631
        ]));
632
    }
633
634
    /**
635
     * Use this method to send video files,
@@ 1061-1075 (lines=15) @@
1058
     * @throws \TelegramBot\Api\InvalidArgumentException
1059
     * @throws \TelegramBot\Api\Exception
1060
     */
1061
    public function editMessageCaption(
1062
        $chatId,
1063
        $messageId,
1064
        $caption = null,
1065
        $replyMarkup = null,
1066
        $inlineMessageId = null
1067
    ) {
1068
        return Message::fromResponse($this->call('editMessageCaption', [
1069
            'chat_id' => $chatId,
1070
            'message_id' => $messageId,
1071
            'inline_message_id' => $inlineMessageId,
1072
            'caption' => $caption,
1073
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
1074
        ]));
1075
    }
1076
1077
    /**
1078
     * Use this method to edit only the reply markup of messages sent by the bot or via the bot