Code Duplication    Length = 11-13 lines in 3 locations

src/BotApi.php 3 locations

@@ 607-619 (lines=13) @@
604
     *        Types\ReplyKeyboardRemove|null $replyMarkup
605
     * @return \TelegramBot\Api\Types\Message
606
     */
607
    public function stopMessageLiveLocation(
608
        $chatId,
609
        $messageId,
610
        $inlineMessageId,
611
        $replyMarkup = null
612
    ) {
613
        return Message::fromResponse($this->call('sendLocation', [
614
            'chat_id'           => $chatId,
615
            'message_id'        => $messageId,
616
            'inline_message_id' => $inlineMessageId,
617
            'reply_markup'      => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
618
        ]));
619
    }
620
621
    /**
622
     * Use this method to send information about a venue. On success, the sent Message is returned.
@@ 1220-1232 (lines=13) @@
1217
     *
1218
     * @return Message
1219
     */
1220
    public function editMessageReplyMarkup(
1221
        $chatId,
1222
        $messageId,
1223
        $replyMarkup = null,
1224
        $inlineMessageId = null
1225
    ) {
1226
        return Message::fromResponse($this->call('editMessageReplyMarkup', [
1227
            'chat_id' => $chatId,
1228
            'message_id' => $messageId,
1229
            'inline_message_id' => $inlineMessageId,
1230
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
1231
        ]));
1232
    }
1233
1234
    /**
1235
     * Use this method to delete a message, including service messages, with the following limitations:
@@ 1868-1878 (lines=11) @@
1865
     * @throws \TelegramBot\Api\InvalidArgumentException
1866
     * @throws \TelegramBot\Api\Exception
1867
     */
1868
    public function stopPoll(
1869
        $chatId,
1870
        $messageId,
1871
        $replyMarkup = null
1872
    ) {
1873
        return Poll::fromResponse($this->call('stopPoll', [
1874
            'chat_id' => $chatId,
1875
            'message_id' => $messageId,
1876
            'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(),
1877
        ]));
1878
    }
1879
1880
    /**
1881
     * Set an option for a cURL transfer