Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down Expand Up @@ -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<static>
*/
public static function where(
string|callable $column,
string|\Closure $column,
mixed $operatorOrValue = null,
mixed $value = null,
): ModelBuilder {
Expand Down
32 changes: 16 additions & 16 deletions src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -896,15 +896,15 @@ 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
*/
public function leftJoinSub(
Builder $query,
string $alias,
string|callable $firstOrCallback,
string|\Closure $firstOrCallback,
?string $operator = null,
?string $second = null,
): static {
Expand All @@ -929,15 +929,15 @@ 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
*/
protected function addJoin(
string $type,
string $table,
string|callable $firstOrCallback,
string|\Closure $firstOrCallback,
?string $operator,
?string $second,
): static {
Expand Down
Loading