Code Duplication    Length = 11-11 lines in 4 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 1 location

@@ 361-371 (lines=11) @@
358
    /**
359
     * {@inheritdoc}
360
     */
361
    protected function getRenameTableInstructions($tableName, $newTableName)
362
    {
363
        $this->updateCreatedTableName($tableName, $newTableName);
364
        $sql = sprintf(
365
            'RENAME TABLE %s TO %s',
366
            $this->quoteTableName($tableName),
367
            $this->quoteTableName($newTableName)
368
        );
369
370
        return new AlterInstructions([], [$sql]);
371
    }
372
373
    /**
374
     * {@inheritdoc}

src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location

@@ 451-461 (lines=11) @@
448
    /**
449
     * {@inheritdoc}
450
     */
451
    protected function getRenameTableInstructions($tableName, $newTableName)
452
    {
453
        $this->updateCreatedTableName($tableName, $newTableName);
454
        $sql = sprintf(
455
            'ALTER TABLE %s RENAME TO %s',
456
            $this->quoteTableName($tableName),
457
            $this->quoteTableName($newTableName)
458
        );
459
460
        return new AlterInstructions([], [$sql]);
461
    }
462
463
    /**
464
     * {@inheritdoc}

src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location

@@ 356-366 (lines=11) @@
353
    /**
354
     * {@inheritdoc}
355
     */
356
    protected function getRenameTableInstructions($tableName, $newTableName)
357
    {
358
        $this->updateCreatedTableName($tableName, $newTableName);
359
        $sql = sprintf(
360
            'EXEC sp_rename \'%s\', \'%s\'',
361
            $tableName,
362
            $newTableName
363
        );
364
365
        return new AlterInstructions([], [$sql]);
366
    }
367
368
    /**
369
     * {@inheritdoc}

src/Phinx/Db/Adapter/PostgresAdapter.php 1 location

@@ 342-352 (lines=11) @@
339
    /**
340
     * {@inheritdoc}
341
     */
342
    protected function getRenameTableInstructions($tableName, $newTableName)
343
    {
344
        $this->updateCreatedTableName($tableName, $newTableName);
345
        $sql = sprintf(
346
            'ALTER TABLE %s RENAME TO %s',
347
            $this->quoteTableName($tableName),
348
            $this->quoteColumnName($newTableName)
349
        );
350
351
        return new AlterInstructions([], [$sql]);
352
    }
353
354
    /**
355
     * {@inheritdoc}