@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | if (isset($values["link"]) && ($values["link"] !== NULL)) { |
| 98 | 98 | $values["message"] .= "\n"; |
| 99 | 99 | $values["message"] .= "<" . $values["link"]; |
| 100 | - if(isset($values["link_text"]) && ($values["link_text"] !== NULL)) { |
|
| 100 | + if (isset($values["link_text"]) && ($values["link_text"] !== NULL)) { |
|
| 101 | 101 | $values["message"] .= "|" . $values["link_text"]; |
| 102 | 102 | } |
| 103 | - $values["message"] .= ">" ; |
|
| 103 | + $values["message"] .= ">"; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Set the parameters for the request |
@@ -142,13 +142,13 @@ discard block |
||
| 142 | 142 | try { |
| 143 | 143 | $client = new \GuzzleHttp\Client(); |
| 144 | 144 | $json_response = $client->request('POST', $this->url, [ |
| 145 | - 'body' => json_encode( $params ) |
|
| 145 | + 'body' => json_encode($params) |
|
| 146 | 146 | ]); |
| 147 | 147 | // $curl_status = $json_response->getStatusCode(); |
| 148 | 148 | // $response = json_decode( $json_response->getBody() ); |
| 149 | 149 | } |
| 150 | - catch(RequestException $e) { |
|
| 151 | - throw new RuntimeException('The request to the webhook failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 150 | + catch (RequestException $e) { |
|
| 151 | + throw new RuntimeException('The request to the webhook failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | // We re-initialize the attachments to prevent any conflict with a future message. |