Code Duplication    Length = 15-15 lines in 2 locations

Bootstrap/Update.php 2 locations

@@ 472-486 (lines=15) @@
469
        }
470
    }
471
472
    private function recreateRemoteCategoriesAndProductAssignments()
473
    {
474
        if (version_compare($this->version, '1.1.4', '<=')) {
475
            try {
476
                $this->db->query('INSERT INTO `s_plugin_connect_config` (`name`, `value`) VALUES ("recreateConnectCategories", "0")');
477
            } catch (\Exception $e) {
478
                // ignore it if exists
479
                $this->logger->write(
480
                    true,
481
                    sprintf('An error occurred during update to version %s stacktrace: %s', $this->version, $e->getTraceAsString()),
482
                    $e->getMessage()
483
                );
484
            }
485
        }
486
    }
487
488
    /**
489
     * Create index by articleID in s_plugin_connect_product_to_categories table.
@@ 491-505 (lines=15) @@
488
    /**
489
     * Create index by articleID in s_plugin_connect_product_to_categories table.
490
     */
491
    private function addProductToCategoryIndex()
492
    {
493
        if (version_compare($this->version, '1.1.6', '<=')) {
494
            try {
495
                $this->db->query('ALTER TABLE s_plugin_connect_product_to_categories ADD INDEX article_id(articleID)');
496
            } catch (\Exception $e) {
497
                // ignore it if exists
498
                $this->logger->write(
499
                    true,
500
                    sprintf('An error occurred during update to version %s stacktrace: %s', $this->version, $e->getTraceAsString()),
501
                    $e->getMessage()
502
                );
503
            }
504
        }
505
    }
506
}
507