Code Duplication    Length = 15-15 lines in 2 locations

src/BotApi.php 2 locations

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