| Conditions | 3 |
| Paths | 4 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function send() |
||
| 42 | { |
||
| 43 | $this->client = new SoapClient($this->settings->url); |
||
| 44 | $response = collect(); |
||
| 45 | foreach ($this->recipients as $recipient) { |
||
| 46 | $result = $this->client->sendSms( |
||
| 47 | $this->settings->username, |
||
| 48 | $this->settings->password, |
||
| 49 | [$this->settings->from], |
||
| 50 | [$recipient], |
||
| 51 | [$this->body], |
||
| 52 | [], |
||
| 53 | rand() |
||
| 54 | ); |
||
| 55 | |||
| 56 | $response->put($recipient, $result); |
||
| 57 | } |
||
| 58 | |||
| 59 | return (count($this->recipients) == 1) ? $response->first() : $response; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |