Skip to content

Commit

Permalink
Move psalm type declaration to method docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Nov 23, 2023
1 parent a83ccc9 commit 813448d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ public function createIndex(
* @throws NotSupportedException
*
* Note: The method will quote the `table` and `columns` parameter before using it in the generated SQL.
*
* @psalm-param array<string, ColumnInterface>|string[] $columns
*/
public function createTable(string $table, array $columns, string $options = null): static;

Expand Down
1 change: 0 additions & 1 deletion src/QueryBuilder/AbstractDDLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ public function createTable(string $table, array $columns, string $options = nul
{
$cols = [];

/** @psalm-var array<string, ColumnInterface>|string[] $columns */
foreach ($columns as $name => $type) {
if (is_string($name)) {
$cols[] = "\t"
Expand Down
2 changes: 2 additions & 0 deletions src/QueryBuilder/DDLQueryBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ public function createIndex(
* @return string The SQL statement for creating a new DB table.
*
* Note: The method will quote the `table` and `columns` parameter before using it in the generated SQL.
*
* @psalm-param array<string, ColumnInterface>|string[] $columns
*/
public function createTable(string $table, array $columns, string $options = null): string;

Expand Down

0 comments on commit 813448d

Please sign in to comment.