Skip to content

Commit

Permalink
Run pint
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrig committed Mar 14, 2024
1 parent f7bf8e1 commit 06e054d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Concerns/HasAccessTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function tokenCan(string $ability): bool
return $this->accessToken ? $this->accessToken->can($ability) : false;
}

public function createToken(array $abilities = ['*'], string $name = null)
public function createToken(array $abilities = ['*'], ?string $name = null)
{
$token = $this->tokens()->create([
'token' => hash('sha256', $plainToken = str()->random(40)),
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/HasAccessTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public function tokens();

public function tokenCan(string $ability): bool;

public function createToken(array $abilities = ['*'], string $name = null);
public function createToken(array $abilities = ['*'], ?string $name = null);

public function currentAccessToken(): HasAbilities;

Expand Down
2 changes: 1 addition & 1 deletion src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function findAccessToken(string $plainToken): ?AccessToken
return $accessToken;
}

protected function supportsTokens(Model $tokenable = null): bool
protected function supportsTokens(?Model $tokenable = null): bool
{
return $tokenable && $tokenable instanceof HasAccessTokens;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Jobs/UpdateAccessTokensLastUsed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class UpdateAccessTokensLastUsed implements ShouldQueue, ShouldBeUnique
class UpdateAccessTokensLastUsed implements ShouldBeUnique, ShouldQueue
{
use InteractsWithQueue;
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

Expand Down

0 comments on commit 06e054d

Please sign in to comment.