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

@@ 325-336 (lines=12) @@
322
     * @param string $tableName
323
     * @return bool
324
     */
325
    protected function tableExist($tableName)
326
    {
327
        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
328
        $sm = $this->dbHandler->getConnection()->getSchemaManager();
329
        foreach($sm->listTables() as $table) {
330
            if ($table->getName() == $tableName) {
331
                return true;
332
            }
333
        }
334
335
        return false;
336
    }
337
338
    protected function migrationToArray(Migration $migration)
339
    {