Passed
Push — master ( b7341c...97f9f4 )
by Dmitry
01:49
created
src/Request.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,9 @@  discard block
 block discarded – undo
140 140
             $payload['iat'] = $this->get_param_iat();
141 141
             $ar['token'] = $this->token_encode($payload);
142 142
 
143
-            if (isset($ar['data'])) unset($ar['data']);
143
+            if (isset($ar['data'])) {
144
+                unset($ar['data']);
145
+            }
144 146
         }
145 147
         $json = json_encode($ar, JSON_UNESCAPED_SLASHES);
146 148
 
@@ -174,8 +176,7 @@  discard block
 block discarded – undo
174 176
         try
175 177
         {
176 178
             $token = JWT::encode($payload, $this->own_private_key(), 'RS512');
177
-        }
178
-        catch (\Exception $e)
179
+        } catch (\Exception $e)
179 180
         {
180 181
             Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString());
181 182
             throw new Exception\JSON('unable to create JWT token', $e);
@@ -204,8 +205,7 @@  discard block
 block discarded – undo
204 205
             $body = $httpresponse->getBody()->getContents();
205 206
             Log::instance()->debug('got response:'.PHP_EOL.$body);
206 207
             return new $this->response_class($body, $this->jwt);
207
-        }
208
-        catch (\GuzzleHttp\Exception\RequestException $e)
208
+        } catch (\GuzzleHttp\Exception\RequestException $e)
209 209
         {
210 210
             $this->handle_request_exception($e);
211 211
         }
Please login to merge, or discard this patch.