Code Duplication    Length = 7-14 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 431-437 (lines=7) @@
428
     * @param array $options Options
429
     * @return \Phinx\Db\Table
430
     */
431
    public function addForeignKey($columns, $referencedTable, $referencedColumns = ['id'], $options = [])
432
    {
433
        $action = AddForeignKey::build($this->table, $columns, $referencedTable, $referencedColumns, $options);
434
        $this->actions->addAction($action);
435
436
        return $this;
437
    }
438
439
    /**
440
     * Add a foreign key to a database table with a given name.
@@ 452-465 (lines=14) @@
449
     * @param array $options Options
450
     * @return \Phinx\Db\Table
451
     */
452
    public function addForeignKeyWithName($name, $columns, $referencedTable, $referencedColumns = ['id'], $options = [])
453
    {
454
        $action = AddForeignKey::build(
455
            $this->table,
456
            $columns,
457
            $referencedTable,
458
            $referencedColumns,
459
            $options,
460
            $name
461
        );
462
        $this->actions->addAction($action);
463
464
        return $this;
465
    }
466
467
    /**
468
     * Removes the given foreign key from the table.