Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

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