Code Duplication    Length = 11-11 lines in 4 locations

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

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

@@ 364-374 (lines=11) @@
361
    /**
362
     * @inheritDoc
363
     */
364
    protected function getRenameTableInstructions($tableName, $newTableName)
365
    {
366
        $this->updateCreatedTableName($tableName, $newTableName);
367
        $sql = sprintf(
368
            "EXEC sp_rename '%s', '%s'",
369
            $tableName,
370
            $newTableName
371
        );
372
373
        return new AlterInstructions([], [$sql]);
374
    }
375
376
    /**
377
     * @inheritDoc

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

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

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

@@ 476-486 (lines=11) @@
473
    /**
474
     * @inheritDoc
475
     */
476
    protected function getRenameTableInstructions($tableName, $newTableName)
477
    {
478
        $this->updateCreatedTableName($tableName, $newTableName);
479
        $sql = sprintf(
480
            'ALTER TABLE %s RENAME TO %s',
481
            $this->quoteTableName($tableName),
482
            $this->quoteTableName($newTableName)
483
        );
484
485
        return new AlterInstructions([], [$sql]);
486
    }
487
488
    /**
489
     * @inheritDoc