From 033b39acaa13b1218653096ebe10234e23543e82 Mon Sep 17 00:00:00 2001 From: markus Date: Thu, 14 Mar 2024 11:21:48 +0100 Subject: [PATCH] Run pint --- src/Concerns/HasAccessTokens.php | 2 +- src/Contracts/HasAccessTokens.php | 2 +- src/Guard.php | 2 +- src/Jobs/UpdateAccessTokensLastUsed.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Concerns/HasAccessTokens.php b/src/Concerns/HasAccessTokens.php index dd15da8..a8404ca 100644 --- a/src/Concerns/HasAccessTokens.php +++ b/src/Concerns/HasAccessTokens.php @@ -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)), diff --git a/src/Contracts/HasAccessTokens.php b/src/Contracts/HasAccessTokens.php index 24e153e..501a84c 100644 --- a/src/Contracts/HasAccessTokens.php +++ b/src/Contracts/HasAccessTokens.php @@ -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; diff --git a/src/Guard.php b/src/Guard.php index 78ff7a7..31c9a44 100644 --- a/src/Guard.php +++ b/src/Guard.php @@ -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; } diff --git a/src/Jobs/UpdateAccessTokensLastUsed.php b/src/Jobs/UpdateAccessTokensLastUsed.php index 7e82533..c361746 100644 --- a/src/Jobs/UpdateAccessTokensLastUsed.php +++ b/src/Jobs/UpdateAccessTokensLastUsed.php @@ -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;