Skip to content

Commit

Permalink
Merge pull request #286 from RomkaLTU/fix/explicit-nullable-callable-…
Browse files Browse the repository at this point in the history
…type

Add explicit nullable type for additionalQuery parameter
  • Loading branch information
freekmurze authored Dec 23, 2024
2 parents 65fe98e + 0ebb170 commit 23dcb4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function generateSubstring($slugSourceString)
return substr($slugSourceString, 0, $this->slugOptions->maximumLength);
}

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

0 comments on commit 23dcb4c

Please sign in to comment.