Commit 605e2015 authored by Guilherme Blanco's avatar Guilherme Blanco

Type hinted Table constructor

parent 0e273a9c
...@@ -48,7 +48,6 @@ class Table extends AbstractAsset ...@@ -48,7 +48,6 @@ class Table extends AbstractAsset
private $implicitIndexes = []; private $implicitIndexes = [];
/** /**
* @param string $tableName
* @param Column[] $columns * @param Column[] $columns
* @param Index[] $indexes * @param Index[] $indexes
* @param UniqueConstraint[] $uniqueConstraints * @param UniqueConstraint[] $uniqueConstraints
...@@ -58,18 +57,18 @@ class Table extends AbstractAsset ...@@ -58,18 +57,18 @@ class Table extends AbstractAsset
* @throws DBALException * @throws DBALException
*/ */
public function __construct( public function __construct(
$tableName, string $name,
array $columns = [], array $columns = [],
array $indexes = [], array $indexes = [],
array $uniqueConstraints = [], array $uniqueConstraints = [],
array $fkConstraints = [], array $fkConstraints = [],
array $options = [] array $options = []
) { ) {
if (strlen($tableName) === 0) { if ($name === '') {
throw DBALException::invalidTableName($tableName); throw DBALException::invalidTableName($name);
} }
$this->_setName($tableName); $this->_setName($name);
foreach ($columns as $column) { foreach ($columns as $column) {
$this->_addColumn($column); $this->_addColumn($column);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment