Code Duplication    Length = 8-8 lines in 2 locations

src/Telegram.php 2 locations

@@ 187-194 (lines=8) @@
184
     * @return \Longman\TelegramBot\Telegram
185
     * @throws \Longman\TelegramBot\Exception\TelegramException
186
     */
187
    public function enableMySql(array $credential, $table_prefix = NULL, $encoding = 'utf8mb4')
188
    {
189
      $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding);
190
      ConversationDB::initializeConversation();
191
      $this->mysql_enabled = TRUE;
192
      
193
      return $this;
194
    }
195
    
196
    public function addNamespaces(array $namespaces = [])
197
    {
@@ 210-217 (lines=8) @@
207
     * @return \Longman\TelegramBot\Telegram
208
     * @throws \Longman\TelegramBot\Exception\TelegramException
209
     */
210
    public function enableExternalMySql($external_pdo_connection, $table_prefix = NULL)
211
    {
212
      $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix);
213
      ConversationDB::initializeConversation();
214
      $this->mysql_enabled = TRUE;
215
      
216
      return $this;
217
    }
218
    
219
    /**
220
     * Get commands list