Code Duplication    Length = 7-14 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 469-475 (lines=7) @@
466
     * @param array $options Options
467
     * @return \Phinx\Db\Table
468
     */
469
    public function addForeignKey($columns, $referencedTable, $referencedColumns = ['id'], $options = [])
470
    {
471
        $action = AddForeignKey::build($this->table, $columns, $referencedTable, $referencedColumns, $options);
472
        $this->actions->addAction($action);
473
474
        return $this;
475
    }
476
477
    /**
478
     * Add a foreign key to a database table with a given name.
@@ 490-503 (lines=14) @@
487
     * @param array $options Options
488
     * @return \Phinx\Db\Table
489
     */
490
    public function addForeignKeyWithName($name, $columns, $referencedTable, $referencedColumns = ['id'], $options = [])
491
    {
492
        $action = AddForeignKey::build(
493
            $this->table,
494
            $columns,
495
            $referencedTable,
496
            $referencedColumns,
497
            $options,
498
            $name
499
        );
500
        $this->actions->addAction($action);
501
502
        return $this;
503
    }
504
505
    /**
506
     * Removes the given foreign key from the table.