Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function send(string $identifier, string $message) { |
||
35 | $config = $this->getConfig(); |
||
36 | $user = $config->getUser(); |
||
37 | $password = $config->getPassword(); |
||
38 | $host = $config->getHost(); |
||
39 | try { |
||
40 | $this->client->get("http://$host/SendSMS", [ |
||
41 | 'query' => [ |
||
42 | 'user' => $user, |
||
43 | 'password' => $password, |
||
44 | 'phone' => $identifier, |
||
45 | 'message' => $message, |
||
46 | ], |
||
47 | ]); |
||
48 | } catch (Exception $ex) { |
||
49 | throw new SmsTransmissionException(); |
||
50 | } |
||
60 |