Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 223-230 (lines=8) @@
220
     * @return \Longman\TelegramBot\Telegram
221
     * @throws \Longman\TelegramBot\Exception\TelegramException
222
     */
223
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
224
    {
225
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
226
        ConversationDB::initializeConversation();
227
        $this->mysql_enabled = true;
228
229
        return $this;
230
    }
231
232
    /**
233
     * Initialize Database external connection
@@ 241-248 (lines=8) @@
238
     * @return \Longman\TelegramBot\Telegram
239
     * @throws \Longman\TelegramBot\Exception\TelegramException
240
     */
241
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
242
    {
243
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
244
        ConversationDB::initializeConversation();
245
        $this->mysql_enabled = true;
246
247
        return $this;
248
    }
249
250
    /**
251
     * Get commands list