| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function send() |
||
| 43 | { |
||
| 44 | $response = collect(); |
||
| 45 | |||
| 46 | foreach ($this->recipients as $recipient) { |
||
| 47 | $result = $this->client->request( |
||
| 48 | 'POST', |
||
| 49 | $this->settings->url, |
||
| 50 | $this->payload($recipient) |
||
| 51 | ); |
||
| 52 | $response->put($recipient, json_decode($result->getBody())); |
||
| 53 | } |
||
| 54 | |||
| 55 | return (count($this->recipients) == 1) ? $response->first() : $response; |
||
| 56 | } |
||
| 57 | |||
| 76 |