Skip to content

Commit 7f2d66f

Browse files
committed
Add type hint for getForeignKeys()
Signed-off-by: Kamil Tekiela <[email protected]>
1 parent 198c6b2 commit 7f2d66f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Utils/Table.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ class Table
1717
/**
1818
* Gets the foreign keys of the table.
1919
*
20-
* @param CreateStatement $statement the statement to be processed
21-
*
22-
* @return array<int, array<string, mixed[]|string|null>>
20+
* @return list<(string|string[]|null)[]>
21+
* @psalm-return list<array{
22+
* constraint: string|null,
23+
* index_list: (int|string)[],
24+
* ref_db_name?: string|null,
25+
* ref_table_name?: string|null,
26+
* ref_index_list?: string[],
27+
* on_update?: string|string[],
28+
* on_delete?: string|string[],
29+
* }>
2330
*/
24-
public static function getForeignKeys($statement): array
31+
public static function getForeignKeys(CreateStatement $statement): array
2532
{
2633
if (empty($statement->fields) || (! is_array($statement->fields)) || (! $statement->options->has('TABLE'))) {
2734
return [];

0 commit comments

Comments
 (0)