Skip to content

Commit

Permalink
Explicitly mark $primaryKeyColumn and $modifyQuery parameters as …
Browse files Browse the repository at this point in the history
…nullable
  • Loading branch information
clarkewing authored Dec 21, 2024
1 parent d6a6dc9 commit ccef4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SortableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function scopeOrdered(Builder $query, string $direction = 'asc')
public static function setNewOrder(
$ids,
int $startOrder = 1,
string $primaryKeyColumn = null,
callable $modifyQuery = null
?string $primaryKeyColumn = null,
?callable $modifyQuery = null
): void {
if (! is_array($ids) && ! $ids instanceof ArrayAccess) {
throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder');
Expand Down

0 comments on commit ccef4c2

Please sign in to comment.