|
40 | 40 | * |
41 | 41 | * @property-read BaseConnection $db |
42 | 42 | * |
| 43 | + * @phpstan-type WhenCallback callable(BaseBuilder, mixed): mixed |
| 44 | + * @phpstan-type WhenDefaultCallback callable(BaseBuilder): mixed |
| 45 | + * |
| 46 | + * @phpstan-import-type row_array from BaseModel |
| 47 | + * |
43 | 48 | * @method $this groupBy($by, ?bool $escape = null) |
44 | 49 | * @method $this groupEnd() |
45 | 50 | * @method $this groupStart() |
|
78 | 83 | * @method $this selectMax(string $select = '', string $alias = '') |
79 | 84 | * @method $this selectMin(string $select = '', string $alias = '') |
80 | 85 | * @method $this selectSum(string $select = '', string $alias = '') |
81 | | - * @method $this when($condition, callable $callback, ?callable $defaultCallback = null) |
82 | | - * @method $this whenNot($condition, callable $callback, ?callable $defaultCallback = null) |
| 86 | + * @method $this when($condition, WhenCallback $callback, ?WhenDefaultCallback $defaultCallback = null) |
| 87 | + * @method $this whenNot($condition, WhenCallback $callback, ?WhenDefaultCallback $defaultCallback = null) |
83 | 88 | * @method $this where($key, $value = null, ?bool $escape = null) |
84 | 89 | * @method $this whereIn(?string $key = null, $values = null, ?bool $escape = null) |
85 | 90 | * @method $this whereNotIn(?string $key = null, $values = null, ?bool $escape = null) |
86 | | - * |
87 | | - * @phpstan-method $this when($condition, callable(BaseBuilder, mixed): mixed $callback, (callable(BaseBuilder): mixed)|null $defaultCallback = null) |
88 | | - * @phpstan-method $this whenNot($condition, callable(BaseBuilder, mixed): mixed $callback, (callable(BaseBuilder): mixed)|null $defaultCallback = null) |
89 | | - * @phpstan-import-type row_array from BaseModel |
90 | 91 | */ |
91 | 92 | class Model extends BaseModel |
92 | 93 | { |
|
0 commit comments