Code Duplication    Length = 7-14 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 460-466 (lines=7) @@
457
     * @param array $options Options
458
     * @return \Phinx\Db\Table
459
     */
460
    public function addForeignKey($columns, $referencedTable, $referencedColumns = ['id'], $options = [])
461
    {
462
        $action = AddForeignKey::build($this->table, $columns, $referencedTable, $referencedColumns, $options);
463
        $this->actions->addAction($action);
464
465
        return $this;
466
    }
467
468
    /**
469
     * Add a foreign key to a database table with a given name.
@@ 481-494 (lines=14) @@
478
     * @param array $options Options
479
     * @return \Phinx\Db\Table
480
     */
481
    public function addForeignKeyWithName($name, $columns, $referencedTable, $referencedColumns = ['id'], $options = [])
482
    {
483
        $action = AddForeignKey::build(
484
            $this->table,
485
            $columns,
486
            $referencedTable,
487
            $referencedColumns,
488
            $options,
489
            $name
490
        );
491
        $this->actions->addAction($action);
492
493
        return $this;
494
    }
495
496
    /**
497
     * Removes the given foreign key from the table.