|
13 | 13 | final class IndexHint implements Component |
14 | 14 | { |
15 | 15 | /** |
16 | | - * The type of hint (USE/FORCE/IGNORE) |
17 | | - */ |
18 | | - public string|null $type; |
19 | | - |
20 | | - /** |
21 | | - * What the hint is for (INDEX/KEY) |
22 | | - */ |
23 | | - public string|null $indexOrKey; |
24 | | - |
25 | | - /** |
26 | | - * The clause for which this hint is (JOIN/ORDER BY/GROUP BY) |
27 | | - */ |
28 | | - public string|null $for; |
29 | | - |
30 | | - /** |
31 | | - * List of indexes in this hint |
32 | | - * |
33 | | - * @var Expression[] |
34 | | - */ |
35 | | - public array $indexes = []; |
36 | | - |
37 | | - /** |
38 | | - * @param string $type the type of hint (USE/FORCE/IGNORE) |
| 16 | + * @param string $type The type of hint (USE/FORCE/IGNORE) |
39 | 17 | * @param string $indexOrKey What the hint is for (INDEX/KEY) |
40 | | - * @param string $for the clause for which this hint is (JOIN/ORDER BY/GROUP BY) |
| 18 | + * @param string|null $for The clause for which this hint is (JOIN/ORDER BY/GROUP BY) |
41 | 19 | * @param Expression[] $indexes List of indexes in this hint |
42 | 20 | */ |
43 | 21 | public function __construct( |
44 | | - string|null $type = null, |
45 | | - string|null $indexOrKey = null, |
46 | | - string|null $for = null, |
47 | | - array $indexes = [], |
| 22 | + public string $type = '', |
| 23 | + public string $indexOrKey = '', |
| 24 | + public string|null $for = null, |
| 25 | + public array $indexes = [], |
48 | 26 | ) { |
49 | | - $this->type = $type; |
50 | | - $this->indexOrKey = $indexOrKey; |
51 | | - $this->for = $for; |
52 | | - $this->indexes = $indexes; |
53 | 27 | } |
54 | 28 |
|
55 | 29 | public function build(): string |
|
0 commit comments