updated-packages
This commit is contained in:
@@ -3,20 +3,21 @@
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside {@link AbstractPlatform}.
|
||||
*/
|
||||
class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/** @var Table */
|
||||
private $table;
|
||||
|
||||
/** @var Column[] */
|
||||
/** @var mixed[][] */
|
||||
private $columns;
|
||||
|
||||
/** @var mixed[] */
|
||||
@@ -29,8 +30,8 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
private $sql = [];
|
||||
|
||||
/**
|
||||
* @param Column[] $columns
|
||||
* @param mixed[] $options
|
||||
* @param mixed[][] $columns
|
||||
* @param mixed[] $options
|
||||
*/
|
||||
public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform)
|
||||
{
|
||||
@@ -49,7 +50,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Column[]
|
||||
* @return mixed[][]
|
||||
*/
|
||||
public function getColumns()
|
||||
{
|
||||
@@ -73,17 +74,15 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs
|
||||
* @return SchemaCreateTableEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->sql = array_merge($this->sql, $sql);
|
||||
} else {
|
||||
$this->sql[] = $sql;
|
||||
}
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user