@@ -73,7 +73,7 @@ class Builder implements BuilderContract
7373 /**
7474 * A replacement for the typical delete function.
7575 *
76- * @var \Closure
76+ * @var \Closure(self): mixed
7777 */
7878 protected $ onDelete ;
7979
@@ -125,7 +125,7 @@ class Builder implements BuilderContract
125125 /**
126126 * Applied global scopes.
127127 *
128- * @var array
128+ * @var array<(\Closure(self): void)>
129129 */
130130 protected $ scopes = [];
131131
@@ -162,7 +162,7 @@ public function make(array $attributes = [])
162162 * Register a new global scope.
163163 *
164164 * @param string $identifier
165- * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
165+ * @param \Illuminate\Database\Eloquent\Scope|( \Closure(self): void) $scope
166166 * @return $this
167167 */
168168 public function withGlobalScope ($ identifier , $ scope )
@@ -285,7 +285,7 @@ public function whereKeyNot($id)
285285 /**
286286 * Add a basic where clause to the query.
287287 *
288- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
288+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
289289 * @param mixed $operator
290290 * @param mixed $value
291291 * @param string $boolean
@@ -307,7 +307,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
307307 /**
308308 * Add a basic where clause to the query, and return the first result.
309309 *
310- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
310+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
311311 * @param mixed $operator
312312 * @param mixed $value
313313 * @param string $boolean
@@ -321,7 +321,7 @@ public function firstWhere($column, $operator = null, $value = null, $boolean =
321321 /**
322322 * Add an "or where" clause to the query.
323323 *
324- * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column
324+ * @param ( \Closure(self): void) |array|string|\Illuminate\Contracts\Database\Query\Expression $column
325325 * @param mixed $operator
326326 * @param mixed $value
327327 * @return $this
@@ -338,7 +338,7 @@ public function orWhere($column, $operator = null, $value = null)
338338 /**
339339 * Add a basic "where not" clause to the query.
340340 *
341- * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
341+ * @param ( \Closure(self): void) |string|array|\Illuminate\Contracts\Database\Query\Expression $column
342342 * @param mixed $operator
343343 * @param mixed $value
344344 * @param string $boolean
@@ -352,7 +352,7 @@ public function whereNot($column, $operator = null, $value = null, $boolean = 'a
352352 /**
353353 * Add an "or where not" clause to the query.
354354 *
355- * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column
355+ * @param ( \Closure(self): void) |array|string|\Illuminate\Contracts\Database\Query\Expression $column
356356 * @param mixed $operator
357357 * @param mixed $value
358358 * @return $this
@@ -519,8 +519,8 @@ public function findOrNew($id, $columns = ['*'])
519519 * Find a model by its primary key or call a callback.
520520 *
521521 * @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
524524 * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|mixed
525525 */
526526 public function findOr ($ id , $ columns = ['* ' ], Closure $ callback = null )
@@ -620,8 +620,8 @@ public function firstOrFail($columns = ['*'])
620620 /**
621621 * Execute the query and get the first result or call a callback.
622622 *
623- * @param \Closure|array|string $columns
624- * @param \Closure|null $callback
623+ * @param ( \Closure(): mixed) |array|string $columns
624+ * @param ( \Closure(): mixed) |null $callback
625625 * @return \Illuminate\Database\Eloquent\Model|static|mixed
626626 */
627627 public function firstOr ($ columns = ['* ' ], Closure $ callback = null )
@@ -761,7 +761,7 @@ public function eagerLoadRelations(array $models)
761761 *
762762 * @param array $models
763763 * @param string $name
764- * @param \Closure $constraints
764+ * @param \Closure(\Illuminate\Database\Eloquent\Relations\Relation): void $constraints
765765 * @return array
766766 */
767767 protected function eagerLoadRelation (array $ models , $ name , Closure $ constraints )
@@ -903,11 +903,10 @@ public function pluck($column, $key = null)
903903 /**
904904 * Paginate the given query.
905905 *
906- * @param int|null|\Closure $perPage
906+ * @param int|null|( \Closure(int): int|null) $perPage
907907 * @param array|string $columns
908908 * @param string $pageName
909909 * @param int|null $page
910- * @param \Closure|int|null $total
911910 * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
912911 *
913912 * @throws \InvalidArgumentException
@@ -1284,7 +1283,7 @@ public function forceDelete()
12841283 /**
12851284 * Register a replacement for the default delete function.
12861285 *
1287- * @param \Closure $callback
1286+ * @param \Closure(self): mixed $callback
12881287 * @return void
12891288 */
12901289 public function onDelete (Closure $ callback )
@@ -1373,7 +1372,7 @@ public function applyScopes()
13731372 /**
13741373 * Apply the given scope on the current builder instance.
13751374 *
1376- * @param callable $scope
1375+ * @param ( callable(mixed $parameters...): mixed) $scope
13771376 * @param array $parameters
13781377 * @return mixed
13791378 */
@@ -1480,7 +1479,7 @@ protected function createNestedWhere($whereSlice, $boolean = 'and')
14801479 * Set the relationships that should be eager loaded.
14811480 *
14821481 * @param string|array $relations
1483- * @param string|\Closure|null $callback
1482+ * @param string|( \Closure(self): self|null) |null $callback
14841483 * @return $this
14851484 */
14861485 public function with ($ relations , $ callback = null )
@@ -1619,8 +1618,8 @@ protected function prepareNestedWithRelationships($relations, $prefix = '')
16191618 /**
16201619 * Combine an array of constraints into a single constraint.
16211620 *
1622- * @param array $constraints
1623- * @return \Closure
1621+ * @param array<(\Closure(self): self|null)> $constraints
1622+ * @return \Closure(self): self
16241623 */
16251624 protected function combineConstraints (array $ constraints )
16261625 {
0 commit comments