Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 167-174 (lines=8) @@
164
     * @return \Longman\TelegramBot\Telegram
165
     * @throws \Longman\TelegramBot\Exception\TelegramException
166
     */
167
    public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4')
168
    {
169
        $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
170
        ConversationDB::initializeConversation();
171
        $this->mysql_enabled = true;
172
173
        return $this;
174
    }
175
176
    /**
177
     * Initialize Database external connection
@@ 185-192 (lines=8) @@
182
     * @return \Longman\TelegramBot\Telegram
183
     * @throws \Longman\TelegramBot\Exception\TelegramException
184
     */
185
    public function enableExternalMySql($external_pdo_connection, $table_prefix = null)
186
    {
187
        $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
188
        ConversationDB::initializeConversation();
189
        $this->mysql_enabled = true;
190
191
        return $this;
192
    }
193
194
    /**
195
     * Get commands list