Code Duplication    Length = 13-14 lines in 3 locations

typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php 3 locations

@@ 1291-1304 (lines=14) @@
1288
     * @param \Doctrine\DBAL\Schema\Table $table
1289
     * @return \Doctrine\DBAL\Schema\Table
1290
     */
1291
    protected function buildQuotedTable(Table $table): Table
1292
    {
1293
        $databasePlatform = $this->connection->getDatabasePlatform();
1294
1295
        return GeneralUtility::makeInstance(
1296
            Table::class,
1297
            $databasePlatform->quoteIdentifier($table->getName()),
1298
            $table->getColumns(),
1299
            $table->getIndexes(),
1300
            $table->getForeignKeys(),
1301
            0,
1302
            $table->getOptions()
1303
        );
1304
    }
1305
1306
    /**
1307
     * Helper function to build a column object that has the _quoted attribute set so that the SchemaManager
@@ 1336-1349 (lines=14) @@
1333
     * @param \Doctrine\DBAL\Schema\Index $index
1334
     * @return \Doctrine\DBAL\Schema\Index
1335
     */
1336
    protected function buildQuotedIndex(Index $index): Index
1337
    {
1338
        $databasePlatform = $this->connection->getDatabasePlatform();
1339
1340
        return GeneralUtility::makeInstance(
1341
            Index::class,
1342
            $databasePlatform->quoteIdentifier($index->getName()),
1343
            $index->getColumns(),
1344
            $index->isUnique(),
1345
            $index->isPrimary(),
1346
            $index->getFlags(),
1347
            $index->getOptions()
1348
        );
1349
    }
1350
1351
    /**
1352
     * Helper function to build a foreign key constraint object that has the _quoted attribute set so that the
@@ 1360-1372 (lines=13) @@
1357
     * @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $index
1358
     * @return \Doctrine\DBAL\Schema\ForeignKeyConstraint
1359
     */
1360
    protected function buildQuotedForeignKey(ForeignKeyConstraint $index): ForeignKeyConstraint
1361
    {
1362
        $databasePlatform = $this->connection->getDatabasePlatform();
1363
1364
        return GeneralUtility::makeInstance(
1365
            ForeignKeyConstraint::class,
1366
            $index->getLocalColumns(),
1367
            $databasePlatform->quoteIdentifier($index->getForeignTableName()),
1368
            $index->getForeignColumns(),
1369
            $databasePlatform->quoteIdentifier($index->getName()),
1370
            $index->getOptions()
1371
        );
1372
    }
1373
}
1374