Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 195-202 (lines=8) @@
192
     * @return \Longman\TelegramBot\Telegram
193
     * @throws \Longman\TelegramBot\Exception\TelegramException
194
     */
195
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
196
    {
197
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
198
        ConversationDB::initializeConversation();
199
        $this->mysql_enabled = true;
200
201
        return $this;
202
    }
203
204
    /**
205
     * Initialize Database external connection
@@ 213-220 (lines=8) @@
210
     * @return \Longman\TelegramBot\Telegram
211
     * @throws \Longman\TelegramBot\Exception\TelegramException
212
     */
213
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
214
    {
215
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
216
        ConversationDB::initializeConversation();
217
        $this->mysql_enabled = true;
218
219
        return $this;
220
    }
221
222
    /**
223
     * Get commands list