Skip to content

Commit

Permalink
Accept null as a parameter for `Sanctum@getAccessTokenFromRequestUsin…
Browse files Browse the repository at this point in the history
…g()` (#477)

* accept null

* style

Co-authored-by: Dries Vints <dries@vints.be>

---------

Co-authored-by: Dries Vints <dries@vints.be>
  • Loading branch information
cosmastech and driesvints committed Nov 3, 2023
1 parent b3853da commit e1a2728
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sanctum.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ public static function usePersonalAccessTokenModel($model)
/**
* Specify a callback that should be used to fetch the access token from the request.
*
* @param callable $callback
* @param callable|null $callback
* @return void
*/
public static function getAccessTokenFromRequestUsing(callable $callback)
public static function getAccessTokenFromRequestUsing(?callable $callback)
{
static::$accessTokenRetrievalCallback = $callback;
}
Expand Down

0 comments on commit e1a2728

Please sign in to comment.