@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | public function getCookieName(): string |
187 | 187 | { |
188 | - return 'login_' . $this->name . '_' . sha1(static::class); |
|
188 | + return 'login_'.$this->name.'_'.sha1(static::class); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | public function getCookieJar(): CookieJar |
199 | 199 | { |
200 | - if (! isset($this->cookie)) { |
|
200 | + if ( ! isset($this->cookie)) { |
|
201 | 201 | throw new RuntimeException('Cookie jar has not been set.'); |
202 | 202 | } |
203 | 203 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $validator->setAudience(config('app.url')); |
281 | 281 | $validator->setIssuer(config('app.url')); |
282 | 282 | |
283 | - if (! $token->validate($validator)) { |
|
283 | + if ( ! $token->validate($validator)) { |
|
284 | 284 | return false; |
285 | 285 | } |
286 | 286 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | $token = (new Parser)->parse($jwt); |
359 | 359 | |
360 | - if (! $this->validateToken($token)) { |
|
360 | + if ( ! $this->validateToken($token)) { |
|
361 | 361 | return null; |
362 | 362 | } |
363 | 363 |
@@ -38,19 +38,19 @@ discard block |
||
38 | 38 | public function handle(): void |
39 | 39 | { |
40 | 40 | $key = $this->generateRandomKey(); |
41 | - $envKey = 'JWT_KEY_' . strtoupper($this->argument('guard')); |
|
41 | + $envKey = 'JWT_KEY_'.strtoupper($this->argument('guard')); |
|
42 | 42 | |
43 | 43 | if ($this->option('show')) { |
44 | - $this->line('<comment>' . $key . '</comment>'); |
|
44 | + $this->line('<comment>'.$key.'</comment>'); |
|
45 | 45 | |
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | - if (! $this->setEnvVariable($envKey, $key)) { |
|
49 | + if ( ! $this->setEnvVariable($envKey, $key)) { |
|
50 | 50 | return; |
51 | 51 | } |
52 | 52 | |
53 | - $this->info('JWT key set successfully for \'' . $this->argument('guard') . '\'.'); |
|
53 | + $this->info('JWT key set successfully for \''.$this->argument('guard').'\'.'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | private function replaceKeyInEnv(string $envKey, string $key, $currentKey): void |
100 | 100 | { |
101 | 101 | file_put_contents($this->laravel->environmentFilePath(), preg_replace( |
102 | - '/^' . preg_quote($envKey . '=' . $currentKey, '/') . '/m', |
|
103 | - $envKey . '=' . $key, |
|
102 | + '/^'.preg_quote($envKey.'='.$currentKey, '/').'/m', |
|
103 | + $envKey.'='.$key, |
|
104 | 104 | file_get_contents($this->laravel->environmentFilePath()) |
105 | 105 | )); |
106 | 106 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | file_put_contents( |
117 | 117 | $this->laravel->environmentFilePath(), |
118 | - PHP_EOL . $envKey . '=' . $key . PHP_EOL, |
|
118 | + PHP_EOL.$envKey.'='.$key.PHP_EOL, |
|
119 | 119 | FILE_APPEND |
120 | 120 | ); |
121 | 121 | } |