Passed
Push — master ( b7341c...97f9f4 )
by Dmitry
01:49
created
src/Response.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,7 @@
 block discarded – undo
139 139
         try
140 140
         {
141 141
             $decoded = (array) JWT::decode($token, $this->uapay_public_key(), array('RS512'));
142
-        }
143
-        catch (\Exception $e)
142
+        } catch (\Exception $e)
144 143
         {
145 144
             Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString());
146 145
             throw new Exception\JSON('unable to decode JWT token', $e);
Please login to merge, or discard this patch.
src/Key.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
             $this->check_exists($fname);
23 23
 
24 24
             $key = $this->load($fname);
25
-        }
26
-        catch (\Exception $e)
25
+        } catch (\Exception $e)
27 26
         {
28 27
             throw new Exception\Runtime('The file with the '.$type.' key was '.$e->getMessage().'!');
29 28
         }
Please login to merge, or discard this patch.
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.