| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 46 | 2 | public function send($text = null, $attachments = []) |
|
| 47 | { |
||
| 48 | 2 | $context = stream_context_create([ |
|
| 49 | 'http' => [ |
||
| 50 | 2 | 'method' => 'POST', |
|
| 51 | 2 | 'header' => 'Content-Type:application/json', |
|
| 52 | 2 | 'content' => Json::encode($this->getPayload($text, $attachments)), |
|
| 53 | 2 | ], |
|
| 54 | 2 | ]); |
|
| 55 | 2 | return file_get_contents($this->remote, false, $context); |
|
| 56 | } |
||
| 57 | |||
| 81 |