Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 189-196 (lines=8) @@
186
     * @return \Longman\TelegramBot\Telegram
187
     * @throws \Longman\TelegramBot\Exception\TelegramException
188
     */
189
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
190
    {
191
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
192
        ConversationDB::initializeConversation();
193
        $this->mysql_enabled = true;
194
195
        return $this;
196
    }
197
198
    /**
199
     * Initialize Database external connection
@@ 207-214 (lines=8) @@
204
     * @return \Longman\TelegramBot\Telegram
205
     * @throws \Longman\TelegramBot\Exception\TelegramException
206
     */
207
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
208
    {
209
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
210
        ConversationDB::initializeConversation();
211
        $this->mysql_enabled = true;
212
213
        return $this;
214
    }
215
216
    /**
217
     * Get commands list