Code Duplication    Length = 11-11 lines in 4 locations

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}

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

@@ 380-390 (lines=11) @@
377
    /**
378
     * {@inheritdoc}
379
     */
380
    protected function getRenameTableInstructions($tableName, $newTableName)
381
    {
382
        $this->updateCreatedTableName($tableName, $newTableName);
383
        $sql = sprintf(
384
            'RENAME TABLE %s TO %s',
385
            $this->quoteTableName($tableName),
386
            $this->quoteTableName($newTableName)
387
        );
388
389
        return new AlterInstructions([], [$sql]);
390
    }
391
392
    /**
393
     * {@inheritdoc}