Skip to content

Commit 23dcb4c

Browse files
authored
Merge pull request #286 from RomkaLTU/fix/explicit-nullable-callable-type
Add explicit nullable type for additionalQuery parameter
2 parents 65fe98e + 0ebb170 commit 23dcb4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HasSlug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected function generateSubstring($slugSourceString)
190190
return substr($slugSourceString, 0, $this->slugOptions->maximumLength);
191191
}
192192

193-
public static function findBySlug(string $slug, array $columns = ['*'], callable $additionalQuery = null)
193+
public static function findBySlug(string $slug, array $columns = ['*'], ?callable $additionalQuery = null)
194194
{
195195
$modelInstance = new static();
196196
$field = $modelInstance->getSlugOptions()->slugField;

0 commit comments

Comments
 (0)