Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

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