diff --git a/src/Eloquent/Model.php b/src/Eloquent/Model.php index 2bb8852..c802466 100644 --- a/src/Eloquent/Model.php +++ b/src/Eloquent/Model.php @@ -55,8 +55,8 @@ * @method static Builder distinct() * * WHERE - * @method static Builder where(string|callable $column, mixed $operatorOrValue = null, mixed $value = null) - * @method static Builder orWhere(string|callable $column, mixed $operatorOrValue = null, mixed $value = null) + * @method static Builder where(string|\Closure $column, mixed $operatorOrValue = null, mixed $value = null) + * @method static Builder orWhere(string|\Closure $column, mixed $operatorOrValue = null, mixed $value = null) * @method static Builder whereNot(string $column, mixed $operatorOrValue, mixed $value = null) * @method static Builder whereRaw(string $expression, array $bindings = []) * @method static Builder orWhereRaw(string $expression, array $bindings = []) @@ -713,13 +713,13 @@ public static function create(array $attributes): static /** * Begin a fluent WHERE query on the model's table. * - * @param string|callable $column + * @param string|\Closure $column * @param mixed $operatorOrValue * @param mixed $value * @return ModelBuilder */ public static function where( - string|callable $column, + string|\Closure $column, mixed $operatorOrValue = null, mixed $value = null, ): ModelBuilder { diff --git a/src/Query/Builder.php b/src/Query/Builder.php index 3511204..fec5bfa 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -188,14 +188,14 @@ public function fromSub(Builder $query, string $alias): static /** * Add a basic WHERE condition. * - * @param string|RawExpression|callable $column + * @param string|RawExpression|\Closure $column * @param mixed $operatorOrValue * @param mixed $value * @param string $boolean * @return static */ public function where( - string|RawExpression|callable $column, + string|RawExpression|\Closure $column, mixed $operatorOrValue = null, mixed $value = null, string $boolean = 'AND', @@ -234,13 +234,13 @@ public function where( /** * Add an OR WHERE condition. * - * @param string|RawExpression|callable $column + * @param string|RawExpression|\Closure $column * @param mixed $operatorOrValue * @param mixed $value * @return static */ public function orWhere( - string|RawExpression|callable $column, + string|RawExpression|\Closure $column, mixed $operatorOrValue = null, mixed $value = null, ): static { @@ -802,14 +802,14 @@ public function notNull(string $column): static * }) * * @param string $table - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @return static */ public function join( string $table, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator = null, ?string $second = null, ): static { @@ -820,14 +820,14 @@ public function join( * Add a LEFT JOIN. * * @param string $table - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @return static */ public function leftJoin( string $table, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator = null, ?string $second = null, ): static { @@ -838,14 +838,14 @@ public function leftJoin( * Add a RIGHT JOIN. * * @param string $table - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @return static */ public function rightJoin( string $table, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator = null, ?string $second = null, ): static { @@ -871,7 +871,7 @@ public function crossJoin(string $table): static * * @param Builder $query * @param string $alias - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @param string $type @@ -880,7 +880,7 @@ public function crossJoin(string $table): static public function joinSub( Builder $query, string $alias, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator = null, ?string $second = null, string $type = 'INNER', @@ -896,7 +896,7 @@ public function joinSub( * * @param Builder $query * @param string $alias - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @return static @@ -904,7 +904,7 @@ public function joinSub( public function leftJoinSub( Builder $query, string $alias, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator = null, ?string $second = null, ): static { @@ -929,7 +929,7 @@ public function joinRaw(string $expression): static * * @param string $type * @param string $table - * @param string|callable $firstOrCallback + * @param string|\Closure $firstOrCallback * @param string|null $operator * @param string|null $second * @return static @@ -937,7 +937,7 @@ public function joinRaw(string $expression): static protected function addJoin( string $type, string $table, - string|callable $firstOrCallback, + string|\Closure $firstOrCallback, ?string $operator, ?string $second, ): static {