@@ -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 | |