Code Duplication    Length = 15-15 lines in 2 locations

src/BotApi.php 2 locations

@@ 630-644 (lines=15) @@
627
     * @throws \TelegramBot\Api\InvalidArgumentException
628
     * @throws \TelegramBot\Api\Exception
629
     */
630
    public function sendSticker(
631
        $chatId,
632
        $sticker,
633
        $replyToMessageId = null,
634
        $replyMarkup = null,
635
        $disableNotification = false
636
    ) {
637
        return Message::fromResponse($this->call('sendSticker', [
638
            'chat_id' => $chatId,
639
            'sticker' => $sticker,
640
            'reply_to_message_id' => $replyToMessageId,
641
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
642
            'disable_notification' => (bool)$disableNotification,
643
        ]));
644
    }
645
646
    /**
647
     * Use this method to send video files,
@@ 1073-1087 (lines=15) @@
1070
     * @throws \TelegramBot\Api\InvalidArgumentException
1071
     * @throws \TelegramBot\Api\Exception
1072
     */
1073
    public function editMessageCaption(
1074
        $chatId,
1075
        $messageId,
1076
        $caption = null,
1077
        $replyMarkup = null,
1078
        $inlineMessageId = null
1079
    ) {
1080
        return Message::fromResponse($this->call('editMessageCaption', [
1081
            'chat_id' => $chatId,
1082
            'message_id' => $messageId,
1083
            'inline_message_id' => $inlineMessageId,
1084
            'caption' => $caption,
1085
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
1086
        ]));
1087
    }
1088
1089
    /**
1090
     * Use this method to edit only the reply markup of messages sent by the bot or via the bot