Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

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