@@ -89,7 +89,7 @@ |
||
| 89 | 89 | */ |
| 90 | 90 | protected function cache() |
| 91 | 91 | { |
| 92 | - if (! method_exists($this->cache, 'tags')) { |
|
| 92 | + if (!method_exists($this->cache, 'tags')) { |
|
| 93 | 93 | return $this->cache; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | protected $tag; |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * @param \Illuminate\Cache\CacheManager $cache |
|
| 21 | + * @param Repository $cache |
|
| 22 | 22 | * @param string $tag |
| 23 | 23 | */ |
| 24 | 24 | public function __construct(Repository $cache, $tag = 'jwt') |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | // if there is no exp claim then add the jwt to |
| 57 | 57 | // the blacklist indefinitely |
| 58 | - if (! $token->hasClaim('exp')) { |
|
| 58 | + if (!$token->hasClaim('exp')) { |
|
| 59 | 59 | return $this->addForever($token); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // check whether the expiry + grace has past |
| 117 | - return $val !== null && ! Carbon::createFromTimestamp($val['valid_until'])->isFuture(); |
|
| 117 | + return $val !== null && !Carbon::createFromTimestamp($val['valid_until'])->isFuture(); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | * |
| 170 | 170 | * @param \Lcobucci\JWT\Token $token |
| 171 | 171 | * |
| 172 | - * @return mixed |
|
| 172 | + * @return string |
|
| 173 | 173 | */ |
| 174 | 174 | public function getKey(Token $token) |
| 175 | 175 | { |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | |
| 21 | 21 | // Check if provided class exists and extends BaseVerifier |
| 22 | 22 | // to avoid possible code injections |
| 23 | - if (is_subclass_of($class = Signer::class.'\\'.$type.'\\'.$algorithm, Signer\BaseSigner::class)) { |
|
| 23 | + if (is_subclass_of($class = Signer::class . '\\' . $type . '\\' . $algorithm, Signer\BaseSigner::class)) { |
|
| 24 | 24 | return new $class; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - throw new InvalidArgumentException('['.$algorithm.'] is not supported in ['.$type.'] verifier.'); |
|
| 27 | + throw new InvalidArgumentException('[' . $algorithm . '] is not supported in [' . $type . '] verifier.'); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | // If we've already retrieved the user for the current request we can just |
| 91 | 91 | // return it back immediately. We do not want to fetch the user data on |
| 92 | 92 | // every call to this method because that would be tremendously slow. |
| 93 | - if (! is_null($this->user)) { |
|
| 93 | + if (!is_null($this->user)) { |
|
| 94 | 94 | return $this->user; |
| 95 | 95 | } |
| 96 | 96 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | $token = $this->token(); |
| 100 | 100 | |
| 101 | - if (! is_null($token)) { |
|
| 101 | + if (!is_null($token)) { |
|
| 102 | 102 | $user = $this->provider->retrieveById($token->getClaim('sub')); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $builder->setSubject($id); |
| 182 | 182 | |
| 183 | 183 | if ($user instanceof ProvidesCredentials) { |
| 184 | - foreach($user->getCredentials() as $key => $value) { |
|
| 184 | + foreach ($user->getCredentials() as $key => $value) { |
|
| 185 | 185 | $builder->set($key, $value); |
| 186 | 186 | } |
| 187 | 187 | } |