Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 231-238 (lines=8) @@
228
     * @return \Longman\TelegramBot\Telegram
229
     * @throws \Longman\TelegramBot\Exception\TelegramException
230
     */
231
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
232
    {
233
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
234
        ConversationDB::initializeConversation();
235
        $this->mysql_enabled = true;
236
237
        return $this;
238
    }
239
240
    /**
241
     * Initialize Database external connection
@@ 249-256 (lines=8) @@
246
     * @return \Longman\TelegramBot\Telegram
247
     * @throws \Longman\TelegramBot\Exception\TelegramException
248
     */
249
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
250
    {
251
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
252
        ConversationDB::initializeConversation();
253
        $this->mysql_enabled = true;
254
255
        return $this;
256
    }
257
258
    /**
259
     * Get commands list