Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 180-187 (lines=8) @@
177
     * @return \Longman\TelegramBot\Telegram
178
     * @throws \Longman\TelegramBot\Exception\TelegramException
179
     */
180
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
181
    {
182
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
183
        ConversationDB::initializeConversation();
184
        $this->mysql_enabled = true;
185
186
        return $this;
187
    }
188
189
    /**
190
     * Initialize Database external connection
@@ 198-205 (lines=8) @@
195
     * @return \Longman\TelegramBot\Telegram
196
     * @throws \Longman\TelegramBot\Exception\TelegramException
197
     */
198
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
199
    {
200
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
201
        ConversationDB::initializeConversation();
202
        $this->mysql_enabled = true;
203
204
        return $this;
205
    }
206
207
    /**
208
     * Get commands list