| Conditions | 3 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3.0327 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 77 | public function sendSingleSms( |
|
| 31 | string $phoneNumber, |
||
| 32 | string $content, |
||
| 33 | string $from = '', |
||
| 34 | string $messageId = '', |
||
| 35 | bool $single = false |
||
| 36 | ) { |
||
| 37 | 77 | $getParameters = []; |
|
| 38 | 22 | $postParameters = [ |
|
| 39 | 77 | 'gsm' => $phoneNumber, |
|
| 40 | 77 | 'text' => $content, |
|
| 41 | 'from' => $from ?: null, |
||
| 42 | 77 | 'single' => $single, |
|
| 43 | 'messageId' => $messageId ?: null |
||
| 44 | ]; |
||
| 45 | |||
| 46 | 55 | $postParameters = array_filter($postParameters, function ($value) { |
|
| 47 | 77 | return $value !== null; |
|
| 48 | 77 | }); |
|
| 49 | 77 | $this->processRequest($getParameters, $postParameters); |
|
| 50 | 7 | return null; |
|
| 51 | } |
||
| 61 |