Code Duplication    Length = 12-12 lines in 2 locations

MigrationVersions/20100101000200_MigrateV1ToV2.php 1 location

@@ 103-114 (lines=12) @@
100
        $output->writeln("<info>All known legacy migration versions have been migrated to the v2 database table</info>");
101
    }
102
103
    private function tableExist($tableName)
104
    {
105
        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
106
        $sm = $this->dbHandler->getConnection()->getSchemaManager();
107
        foreach($sm->listTables() as $table) {
108
            if ($table->getName() == $tableName) {
109
                return true;
110
            }
111
        }
112
113
        return false;
114
    }
115
116
    private function loadLegacyMigrations()
117
    {

Core/StorageHandler/Database.php 1 location

@@ 371-382 (lines=12) @@
368
     * @param string $tableName
369
     * @return bool
370
     */
371
    protected function tableExist($tableName)
372
    {
373
        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
374
        $sm = $this->dbHandler->getConnection()->getSchemaManager();
375
        foreach($sm->listTables() as $table) {
376
            if ($table->getName() == $tableName) {
377
                return true;
378
            }
379
        }
380
381
        return false;
382
    }
383
384
    protected function migrationToArray(Migration $migration)
385
    {