@@ -73,7 +73,7 @@ class Builder implements BuilderContract
73
73
/**
74
74
* A replacement for the typical delete function.
75
75
*
76
- * @var \Closure
76
+ * @var \Closure(self): mixed
77
77
*/
78
78
protected $ onDelete ;
79
79
@@ -125,7 +125,7 @@ class Builder implements BuilderContract
125
125
/**
126
126
* Applied global scopes.
127
127
*
128
- * @var array
128
+ * @var array<(\Closure(self): void)>
129
129
*/
130
130
protected $ scopes = [];
131
131
@@ -162,7 +162,7 @@ public function make(array $attributes = [])
162
162
* Register a new global scope.
163
163
*
164
164
* @param string $identifier
165
- * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
165
+ * @param \Illuminate\Database\Eloquent\Scope|( \Closure(self): void) $scope
166
166
* @return $this
167
167
*/
168
168
public function withGlobalScope ($ identifier , $ scope )
@@ -285,7 +285,7 @@ public function whereKeyNot($id)
285
285
/**
286
286
* Add a basic where clause to the query.
287
287
*
288
- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
288
+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
289
289
* @param mixed $operator
290
290
* @param mixed $value
291
291
* @param string $boolean
@@ -307,7 +307,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
307
307
/**
308
308
* Add a basic where clause to the query, and return the first result.
309
309
*
310
- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
310
+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
311
311
* @param mixed $operator
312
312
* @param mixed $value
313
313
* @param string $boolean
@@ -321,7 +321,7 @@ public function firstWhere($column, $operator = null, $value = null, $boolean =
321
321
/**
322
322
* Add an "or where" clause to the query.
323
323
*
324
- * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column
324
+ * @param ( \Closure(self): void) |array|string|\Illuminate\Contracts\Database\Query\Expression $column
325
325
* @param mixed $operator
326
326
* @param mixed $value
327
327
* @return $this
@@ -338,7 +338,7 @@ public function orWhere($column, $operator = null, $value = null)
338
338
/**
339
339
* Add a basic "where not" clause to the query.
340
340
*
341
- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
341
+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
342
342
* @param mixed $operator
343
343
* @param mixed $value
344
344
* @param string $boolean
@@ -352,7 +352,7 @@ public function whereNot($column, $operator = null, $value = null, $boolean = 'a
352
352
/**
353
353
* Add an "or where not" clause to the query.
354
354
*
355
- * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column
355
+ * @param ( \Closure(self): void) |array|string|\Illuminate\Contracts\Database\Query\Expression $column
356
356
* @param mixed $operator
357
357
* @param mixed $value
358
358
* @return $this
@@ -519,8 +519,8 @@ public function findOrNew($id, $columns = ['*'])
519
519
* Find a model by its primary key or call a callback.
520
520
*
521
521
* @param mixed $id
522
- * @param \Closure|array|string $columns
523
- * @param \Closure|null $callback
522
+ * @param ( \Closure(): mixed) |array|string $columns
523
+ * @param ( \Closure(): mixed) |null $callback
524
524
* @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|mixed
525
525
*/
526
526
public function findOr ($ id , $ columns = ['* ' ], Closure $ callback = null )
@@ -620,8 +620,8 @@ public function firstOrFail($columns = ['*'])
620
620
/**
621
621
* Execute the query and get the first result or call a callback.
622
622
*
623
- * @param \Closure|array|string $columns
624
- * @param \Closure|null $callback
623
+ * @param ( \Closure(): mixed) |array|string $columns
624
+ * @param ( \Closure(): mixed) |null $callback
625
625
* @return \Illuminate\Database\Eloquent\Model|static|mixed
626
626
*/
627
627
public function firstOr ($ columns = ['* ' ], Closure $ callback = null )
@@ -761,7 +761,7 @@ public function eagerLoadRelations(array $models)
761
761
*
762
762
* @param array $models
763
763
* @param string $name
764
- * @param \Closure $constraints
764
+ * @param \Closure(\Illuminate\Database\Eloquent\Relations\Relation): void $constraints
765
765
* @return array
766
766
*/
767
767
protected function eagerLoadRelation (array $ models , $ name , Closure $ constraints )
@@ -903,11 +903,10 @@ public function pluck($column, $key = null)
903
903
/**
904
904
* Paginate the given query.
905
905
*
906
- * @param int|null|\Closure $perPage
906
+ * @param int|null|( \Closure(int): int|null) $perPage
907
907
* @param array|string $columns
908
908
* @param string $pageName
909
909
* @param int|null $page
910
- * @param \Closure|int|null $total
911
910
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
912
911
*
913
912
* @throws \InvalidArgumentException
@@ -1284,7 +1283,7 @@ public function forceDelete()
1284
1283
/**
1285
1284
* Register a replacement for the default delete function.
1286
1285
*
1287
- * @param \Closure $callback
1286
+ * @param \Closure(self): mixed $callback
1288
1287
* @return void
1289
1288
*/
1290
1289
public function onDelete (Closure $ callback )
@@ -1373,7 +1372,7 @@ public function applyScopes()
1373
1372
/**
1374
1373
* Apply the given scope on the current builder instance.
1375
1374
*
1376
- * @param callable $scope
1375
+ * @param ( callable(mixed $parameters...): mixed) $scope
1377
1376
* @param array $parameters
1378
1377
* @return mixed
1379
1378
*/
@@ -1480,7 +1479,7 @@ protected function createNestedWhere($whereSlice, $boolean = 'and')
1480
1479
* Set the relationships that should be eager loaded.
1481
1480
*
1482
1481
* @param string|array $relations
1483
- * @param string|\Closure|null $callback
1482
+ * @param string|( \Closure(self): self|null) |null $callback
1484
1483
* @return $this
1485
1484
*/
1486
1485
public function with ($ relations , $ callback = null )
@@ -1619,8 +1618,8 @@ protected function prepareNestedWithRelationships($relations, $prefix = '')
1619
1618
/**
1620
1619
* Combine an array of constraints into a single constraint.
1621
1620
*
1622
- * @param array $constraints
1623
- * @return \Closure
1621
+ * @param array<(\Closure(self): self|null)> $constraints
1622
+ * @return \Closure(self): self
1624
1623
*/
1625
1624
protected function combineConstraints (array $ constraints )
1626
1625
{
0 commit comments