@@ -171,8 +171,7 @@ |
||
171 | 171 | try |
172 | 172 | { |
173 | 173 | $data = (array) \Firebase\JWT\JWT::decode($token, env('JWT_SECRET'), ['HS256']); |
174 | - } |
|
175 | - catch(\RuntimeException $e) { |
|
174 | + } catch(\RuntimeException $e) { |
|
176 | 175 | $this->logout(); |
177 | 176 | |
178 | 177 | return null; |
@@ -262,8 +262,7 @@ discard block |
||
262 | 262 | |
263 | 263 | try { |
264 | 264 | $response = $this->client->request('me'); |
265 | - } |
|
266 | - catch(\Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException $e) { |
|
265 | + } catch(\Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException $e) { |
|
267 | 266 | return null; |
268 | 267 | } |
269 | 268 | |
@@ -345,8 +344,7 @@ discard block |
||
345 | 344 | |
346 | 345 | try { |
347 | 346 | $output = $callback(); |
348 | - } |
|
349 | - catch(\Exception $e) { |
|
347 | + } catch(\Exception $e) { |
|
350 | 348 | DB::rollBack(); |
351 | 349 | |
352 | 350 | if(is_null($fallback)) { |
@@ -196,8 +196,7 @@ |
||
196 | 196 | $foreigner, |
197 | 197 | $action = $foreigner->getRemoteAction() |
198 | 198 | ); |
199 | - } |
|
200 | - catch(\Slides\Connector\Auth\Exceptions\SyncException $e) { |
|
199 | + } catch(\Slides\Connector\Auth\Exceptions\SyncException $e) { |
|
201 | 200 | \Illuminate\Support\Facades\Log::error( |
202 | 201 | "Cannot $action the user {$foreigner->getEmail()}: " . $e->getMessage() |
203 | 202 | ); |
@@ -140,8 +140,7 @@ discard block |
||
140 | 140 | if($users->isEmpty()) { |
141 | 141 | $this->info('No users found.'); |
142 | 142 | return; |
143 | - } |
|
144 | - else { |
|
143 | + } else { |
|
145 | 144 | if(!$this->confirm('Do you want to restore ' . $users->count() . ' user(s)?')) { |
146 | 145 | return; |
147 | 146 | } |
@@ -152,8 +151,7 @@ discard block |
||
152 | 151 | $this->authService->handle('restore', ['user' => $user]); |
153 | 152 | |
154 | 153 | $this->info('User #' . $user->id . ' (' . $user->email . ') successfully restored.'); |
155 | - } |
|
156 | - catch(\Exception $e) { |
|
154 | + } catch(\Exception $e) { |
|
157 | 155 | $this->error('User #' . $user->id . ' (' . $user->email . ') cannot be restored. ' . $e->getMessage()); |
158 | 156 | } |
159 | 157 | } |
@@ -25,8 +25,7 @@ |
||
25 | 25 | foreach ($input as $key => $value) { |
26 | 26 | if(is_array($value)) { |
27 | 27 | $input[$key] = static::replaceValuesByMatchingKeys($value, $keys, $replacement); |
28 | - } |
|
29 | - elseif(is_string($key) && in_array(strtolower($key), $keys)) { |
|
28 | + } elseif(is_string($key) && in_array(strtolower($key), $keys)) { |
|
30 | 29 | $input[$key] = $replacement instanceof \Closure |
31 | 30 | ? $replacement($key, $value) |
32 | 31 | : $replacement; |
@@ -41,8 +41,7 @@ |
||
41 | 41 | |
42 | 42 | try { |
43 | 43 | return $webhook->handle($payload); |
44 | - } |
|
45 | - catch(\Exception $e) { |
|
44 | + } catch(\Exception $e) { |
|
46 | 45 | throw new WebhookException(get_class($webhook) . ': ' . $e->getMessage()); |
47 | 46 | } |
48 | 47 | } |
@@ -130,8 +130,7 @@ |
||
130 | 130 | { |
131 | 131 | try { |
132 | 132 | $output = $callback(Redis::connection('authService')); |
133 | - } |
|
134 | - catch(\Exception $e) { |
|
133 | + } catch(\Exception $e) { |
|
135 | 134 | \Illuminate\Support\Facades\Log::error($e->getMessage()); |
136 | 135 | \Illuminate\Support\Facades\Log::error($e->getTraceAsString()); |
137 | 136 |