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

@@ 353-364 (lines=12) @@
350
     * @param string $tableName
351
     * @return bool
352
     */
353
    protected function tableExist($tableName)
354
    {
355
        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
356
        $sm = $this->dbHandler->getConnection()->getSchemaManager();
357
        foreach($sm->listTables() as $table) {
358
            if ($table->getName() == $tableName) {
359
                return true;
360
            }
361
        }
362
363
        return false;
364
    }
365
366
    protected function migrationToArray(Migration $migration)
367
    {