Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

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