Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 672-680 (lines=9) @@
669
    /**
670
     * {@inheritdoc}
671
     */
672
    public function addForeignKey(Table $table, ForeignKey $foreignKey)
673
    {
674
        $sql = sprintf(
675
            'ALTER TABLE %s ADD %s',
676
            $this->quoteTableName($table->getName()),
677
            $this->getForeignKeySqlDefinition($foreignKey, $table->getName())
678
        );
679
        $this->execute($sql);
680
    }
681
682
    /**
683
     * {@inheritdoc}

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

@@ 802-811 (lines=10) @@
799
    /**
800
     * {@inheritdoc}
801
     */
802
    public function addForeignKey(Table $table, ForeignKey $foreignKey)
803
    {
804
        $this->execute(
805
            sprintf(
806
                'ALTER TABLE %s ADD %s',
807
                $this->quoteTableName($table->getName()),
808
                $this->getForeignKeySqlDefinition($foreignKey, $table->getName())
809
            )
810
        );
811
    }
812
813
    /**
814
     * {@inheritdoc}