Skip to content

Commit ec0680b

Browse files
committed
Improve types for indexes
1 parent 626c26b commit ec0680b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/Query/CreateIndex.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class CreateIndex
99
public $name;
1010

1111
/**
12-
* @var string
12+
* @var 'INDEX'|'UNIQUE'|'PRIMARY'|'FULLTEXT'|'SPATIAL'
1313
*/
1414
public $type;
1515

src/Schema/Index.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Index
55
{
66
/**
7-
* @var string
7+
* @var 'INDEX'|'UNIQUE'|'PRIMARY'|'FULLTEXT'|'SPATIAL'
88
*/
99
public $type;
1010

@@ -13,6 +13,9 @@ class Index
1313
*/
1414
public $columns;
1515

16+
/**
17+
* @param 'INDEX'|'UNIQUE'|'PRIMARY'|'FULLTEXT'|'SPATIAL' $type
18+
*/
1619
public function __construct(
1720
string $type,
1821
array $columns

src/Schema/TableDefinition.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TableDefinition
3434
public $primaryKeyColumns;
3535

3636
/**
37-
* @var array
37+
* @var array<string, Index>
3838
*/
3939
public $indexes;
4040

@@ -43,6 +43,9 @@ class TableDefinition
4343
*/
4444
public $autoIncrementOffsets = [];
4545

46+
/**
47+
* @param array<string, Index> $indexes
48+
*/
4649
public function __construct(
4750
string $name,
4851
string $databaseName,

0 commit comments

Comments
 (0)