Code Duplication    Length = 7-14 lines in 2 locations

src/Phinx/Db/Table.php 2 locations

@@ 441-447 (lines=7) @@
438
     * @param array $options Options
439
     * @return \Phinx\Db\Table
440
     */
441
    public function addForeignKey($columns, $referencedTable, $referencedColumns = ['id'], $options = [])
442
    {
443
        $action = AddForeignKey::build($this->table, $columns, $referencedTable, $referencedColumns, $options);
444
        $this->actions->addAction($action);
445
446
        return $this;
447
    }
448
449
    /**
450
     * Add a foreign key to a database table with a given name.
@@ 462-475 (lines=14) @@
459
     * @param array $options Options
460
     * @return \Phinx\Db\Table
461
     */
462
    public function addForeignKeyWithName($name, $columns, $referencedTable, $referencedColumns = ['id'], $options = [])
463
    {
464
        $action = AddForeignKey::build(
465
            $this->table,
466
            $columns,
467
            $referencedTable,
468
            $referencedColumns,
469
            $options,
470
            $name
471
        );
472
        $this->actions->addAction($action);
473
474
        return $this;
475
    }
476
477
    /**
478
     * Removes the given foreign key from the table.