Code Duplication    Length = 15-15 lines in 2 locations

src/BotApi.php 2 locations

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