Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 13, 2024
1 parent 41728e8 commit 56a0471
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/HasApiTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function tokenCan(string $ability);
* @param \DateTimeInterface|null $expiresAt
* @return \Laravel\Sanctum\NewAccessToken
*/
public function createToken(string $name, array $abilities = ['*'], DateTimeInterface $expiresAt = null);
public function createToken(string $name, array $abilities = ['*'], ?DateTimeInterface $expiresAt = null);

/**
* Get the access token currently associated with the user.
Expand Down
2 changes: 1 addition & 1 deletion src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function getTokenFromRequest(Request $request)
* @param string|null $token
* @return bool
*/
protected function isValidBearerToken(string $token = null)
protected function isValidBearerToken(?string $token = null)
{
if (! is_null($token) && str_contains($token, '|')) {
$model = new Sanctum::$personalAccessTokenModel;
Expand Down
2 changes: 1 addition & 1 deletion src/HasApiTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function tokenCan(string $ability)
* @param \DateTimeInterface|null $expiresAt
* @return \Laravel\Sanctum\NewAccessToken
*/
public function createToken(string $name, array $abilities = ['*'], DateTimeInterface $expiresAt = null)
public function createToken(string $name, array $abilities = ['*'], ?DateTimeInterface $expiresAt = null)
{
$plainTextToken = $this->generateTokenString();

Expand Down

0 comments on commit 56a0471

Please sign in to comment.