| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | #[\Override] |
||
| 47 | public function send(string $identifier, string $message) { |
||
| 48 | $apiKey = $this->getApiKey(); |
||
| 49 | try { |
||
| 50 | $this->client->get('https://gateway.sms77.io/api/sms', [ |
||
| 51 | 'query' => [ |
||
| 52 | 'p' => $apiKey, |
||
| 53 | 'to' => $identifier, |
||
| 54 | 'text' => $message, |
||
| 55 | 'sendWith' => 'nextcloud' |
||
| 56 | ], |
||
| 57 | ]); |
||
| 58 | } catch (Exception $ex) { |
||
| 59 | throw new MessageTransmissionException(); |
||
| 60 | } |
||
| 63 |