From 2448c25a2c4b588bc0e0b9820f8bbd110a2afd73 Mon Sep 17 00:00:00 2001 From: Hugo Clarke-Wing <7689302+clarkewing@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:54:53 +0100 Subject: [PATCH] Explicitly mark `$primaryKeyColumn` and `$modifyQuery` parameters as nullable (#184) --- src/SortableTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SortableTrait.php b/src/SortableTrait.php index 55c0d16..d8cc172 100644 --- a/src/SortableTrait.php +++ b/src/SortableTrait.php @@ -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');