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/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}

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

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