src/Phinx/Db/Action/DropForeignKey.php
public static function build(Table $table, $columns, $constraint = null)
    {
        if (is_string($columns)) {
            $columns = [$columns];
        }

        $foreignKey = new ForeignKey();
        $foreignKey->setColumns($columns);

        if ($constraint) {
            $foreignKey->setConstraint($constraint);
        }

        return new static($table, $foreignKey);
    }
public static function build(Table $table, $columns, $constraint = null)
    {
        if (is_string($columns)) {
            $columns = [$columns];
        }

        $foreignKey = new ForeignKey();
        $foreignKey->setColumns($columns);

        if ($constraint) {
            $foreignKey->setConstraint($constraint);
        }

        return new static($table, $foreignKey);
    }
public static function build ( Table $ table , $ columns , $ constraint = null ) { if ( is_string ( $ columns ) ) { $ columns = [ $ columns ] ; } $ foreignKey = new ForeignKey ( ) ; $ foreignKey -> setColumns ( $ columns ) ; if ( $ constraint ) { $ foreignKey -> setConstraint ( $ constraint ) ; } return new static ( $ table , $ foreignKey ) ; }
Creates a new DropForeignKey object after building the ForeignKey
definition out of the passed arguments.

@param Table $table The table to delete the foreign key from
@param string|string[] $columns The columns participating in the foreign key
@param string|null $constraint The constraint name
@return DropForeignKey
Creates a new DropForeignKey object after building the ForeignKey definition out of the passed arguments .