@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $body = $this->parseResponse($res); |
| 108 | 108 | |
| 109 | 109 | if ($body->status === 'ERROR') { |
| 110 | - if($body->code === 201) throw CouldNotReceiveNotification::noNewMessages(); |
|
| 110 | + if ($body->code === 201) throw CouldNotReceiveNotification::noNewMessages(); |
|
| 111 | 111 | throw StandardNotification::serviceRespondedWithAnError($body); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -131,6 +131,6 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function parseResponse($res) |
| 133 | 133 | { |
| 134 | - return json_decode($res->getBody()->getContents())[0] ?? null; |
|
| 134 | + return json_decode($res->getBody()->getContents())[ 0 ] ?? null; |
|
| 135 | 135 | } |
| 136 | 136 | } |
@@ -72,7 +72,9 @@ discard block |
||
| 72 | 72 | ], |
| 73 | 73 | ]); |
| 74 | 74 | |
| 75 | - if (!$res) throw CouldNotSendNotification::serviceUnknownResponse(); |
|
| 75 | + if (!$res) { |
|
| 76 | + throw CouldNotSendNotification::serviceUnknownResponse(); |
|
| 77 | + } |
|
| 76 | 78 | |
| 77 | 79 | $body = $this->parseResponse($res); |
| 78 | 80 | |
@@ -102,12 +104,16 @@ discard block |
||
| 102 | 104 | ], |
| 103 | 105 | ]); |
| 104 | 106 | |
| 105 | - if (!$res) throw CouldNotReceiveNotification::serviceUnknownResponse(); |
|
| 107 | + if (!$res) { |
|
| 108 | + throw CouldNotReceiveNotification::serviceUnknownResponse(); |
|
| 109 | + } |
|
| 106 | 110 | |
| 107 | 111 | $body = $this->parseResponse($res); |
| 108 | 112 | |
| 109 | 113 | if ($body->status === 'ERROR') { |
| 110 | - if($body->code === 201) throw CouldNotReceiveNotification::noNewMessages(); |
|
| 114 | + if($body->code === 201) { |
|
| 115 | + throw CouldNotReceiveNotification::noNewMessages(); |
|
| 116 | + } |
|
| 111 | 117 | throw StandardNotification::serviceRespondedWithAnError($body); |
| 112 | 118 | } |
| 113 | 119 | |