Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 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 | $protocol = $config->getProtocol(); |
||
40 | try { |
||
41 | $this->client->get("$protocol://$host/SendSMS", [ |
||
42 | 'query' => [ |
||
43 | 'user' => $user, |
||
44 | 'password' => $password, |
||
45 | 'phone' => $identifier, |
||
46 | 'message' => $message, |
||
47 | ], |
||
48 | ]); |
||
49 | } catch (Exception $ex) { |
||
50 | throw new SmsTransmissionException(); |
||
51 | } |
||
61 |