diff --git a/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php index cb031cf6606..e6cba32521a 100644 --- a/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php +++ b/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php @@ -28,6 +28,7 @@ trait QueriesRelationships * @param string $operator * @param int $count * @param string $boolean + * @param \Closure|null $callback * @return $this * * @throws \RuntimeException @@ -122,6 +123,7 @@ public function orHas($relation, $operator = '>=', $count = 1) * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param string $boolean + * @param \Closure|null $callback * @return $this */ public function doesntHave($relation, $boolean = 'and', ?Closure $callback = null) @@ -144,6 +146,7 @@ public function orDoesntHave($relation) * Add a relationship count / exists condition to the query with where clauses. * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|null $callback * @param string $operator * @param int $count * @return $this @@ -159,6 +162,7 @@ public function whereHas($relation, ?Closure $callback = null, $operator = '>=', * Also load the relationship with same condition. * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|null $callback * @param string $operator * @param int $count * @return $this @@ -173,6 +177,7 @@ public function withWhereHas($relation, ?Closure $callback = null, $operator = ' * Add a relationship count / exists condition to the query with where clauses and an "or". * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|null $callback * @param string $operator * @param int $count * @return $this @@ -186,6 +191,7 @@ public function orWhereHas($relation, ?Closure $callback = null, $operator = '>= * Add a relationship count / exists condition to the query with where clauses. * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|null $callback * @return $this */ public function whereDoesntHave($relation, ?Closure $callback = null) @@ -197,6 +203,7 @@ public function whereDoesntHave($relation, ?Closure $callback = null) * Add a relationship count / exists condition to the query with where clauses and an "or". * * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|null $callback * @return $this */ public function orWhereDoesntHave($relation, ?Closure $callback = null) @@ -212,6 +219,7 @@ public function orWhereDoesntHave($relation, ?Closure $callback = null) * @param string $operator * @param int $count * @param string $boolean + * @param \Closure|null $callback * @return $this */ public function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', ?Closure $callback = null) @@ -308,6 +316,7 @@ public function orHasMorph($relation, $types, $operator = '>=', $count = 1) * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param string $boolean + * @param \Closure|null $callback * @return $this */ public function doesntHaveMorph($relation, $types, $boolean = 'and', ?Closure $callback = null) @@ -332,6 +341,7 @@ public function orDoesntHaveMorph($relation, $types) * * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types + * @param \Closure|null $callback * @param string $operator * @param int $count * @return $this @@ -346,6 +356,7 @@ public function whereHasMorph($relation, $types, ?Closure $callback = null, $ope * * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types + * @param \Closure|null $callback * @param string $operator * @param int $count * @return $this @@ -372,6 +383,7 @@ public function whereDoesntHaveMorph($relation, $types, ?Closure $callback = nul * * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types + * @param \Closure|null $callback * @return $this */ public function orWhereDoesntHaveMorph($relation, $types, ?Closure $callback = null) @@ -925,6 +937,11 @@ public function mergeConstraintsFrom(Builder $from) /** * Updates the table name for any columns with a new qualified name. + * + * @param array $wheres + * @param string $from + * @param string $to + * @return array */ protected function requalifyWhereTables(array $wheres, string $from, string $to): array { @@ -940,6 +957,7 @@ protected function requalifyWhereTables(array $wheres, string $from, string $to) /** * Add a sub-query count clause to this query. * + * @param \Illuminate\Database\Query\Builder $query * @param string $operator * @param int $count * @param string $boolean