Code Duplication    Length = 14-15 lines in 2 locations

src/Core/Edit.php 1 location

@@ 21-34 (lines=14) @@
18
     * @param $parse_mode <i>Optional</i>. Send Markdown or HTML.
19
     * @param $disable_web_preview <i>Optional</i>. Disables link previews for links in this message.
20
     */
21
    public function editMessageText(int $message_id, $text, $reply_markup = null, string $parse_mode = 'HTML', bool $disable_web_preview = true) {
22
23
        $parameters = [
24
            'chat_id' => $this->_chat_id,
25
            'message_id' => $message_id,
26
            'text' => $text,
27
            'reply_markup' => $reply_markup,
28
            'parse_mode' => $parse_mode,
29
            'disable_web_page_preview' => $disable_web_preview,
30
        ];
31
32
        return $this->exec_curl_request('editMessageText?' . http_build_query($parameters));
33
34
    }
35
36
    /**
37
     * \brief Edit text of a message sent via the bot.

src/Core/Send.php 1 location

@@ 175-189 (lines=15) @@
172
     * @param $reply_to_message_id <i>Optional</i>. If the message is a reply, ID of the original message.
173
     * @return On success, the sent message is returned.
174
     */
175
    public function sendVoice($voice, string $caption, int $duration, string $reply_markup = null, bool $disable_notification, int $reply_to_message_id = 0) {
176
177
        $parameters = [
178
            'chat_id' => $this->_chat_id,
179
            'voice' => $voice,
180
            'caption' => $caption,
181
            'duration' => $duration,
182
            'disable_notification', $disable_notification,
183
            'reply_to_message_id' => $reply_to_message_id,
184
            'reply_markup' => $reply_markup
185
        ];
186
187
        return $this->exec_curl_request('sendVoice?' . http_build_query($parameters));
188
189
    }
190
191
    /**
192
     * \brief Say the user what action is the bot doing.