Code Duplication    Length = 10-10 lines in 2 locations

src/Phinx/Db/Adapter/TablePrefixAdapter.php 2 locations

@@ 171-180 (lines=10) @@
168
    /**
169
     * {@inheritdoc}
170
     */
171
    public function addColumn(Table $table, Column $column)
172
    {
173
        $adapter = $this->getAdapter();
174
        if (!$adapter instanceof DirectActionInterface) {
175
            throw new \BadMethodCallException('The underlying adapter does not implement DirectActionInterface');
176
        }
177
        $adapterTableName = $this->getAdapterTableName($table->getName());
178
        $adapterTable = new Table($adapterTableName, $table->getOptions());
179
        $adapter->addColumn($adapterTable, $column);
180
    }
181
182
    /**
183
     * {@inheritdoc}
@@ 303-312 (lines=10) @@
300
    /**
301
     * {@inheritdoc}
302
     */
303
    public function addForeignKey(Table $table, ForeignKey $foreignKey)
304
    {
305
        $adapter = $this->getAdapter();
306
        if (!$adapter instanceof DirectActionInterface) {
307
            throw new \BadMethodCallException('The underlying adapter does not implement DirectActionInterface');
308
        }
309
        $adapterTableName = $this->getAdapterTableName($table->getName());
310
        $adapterTable = new Table($adapterTableName, $table->getOptions());
311
        $adapter->addForeignKey($adapterTable, $foreignKey);
312
    }
313
314
    /**
315
     * {@inheritdoc}