| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0987 |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 14 | 21 | public function sendSms($tempId, $to, array $data, $content) |
|
| 15 | { |
||
| 16 | //作为寄生代理器发送短信 |
||
| 17 | 21 | if (is_callable($this->sendSms)) { |
|
| 18 | call_user_func_array($this->sendSms, [$this, $to, $tempId, $data, $content]); |
||
| 19 | |||
| 20 | return; |
||
| 21 | } |
||
| 22 | //作为测试代理器 |
||
| 23 | 21 | if ($content) { |
|
| 24 | 18 | $this->sendContentSms($to, $content); |
|
| 25 | 18 | } else { |
|
| 26 | 3 | $this->sendTemplateSms($tempId, $to, $data); |
|
| 27 | } |
||
| 28 | 21 | } |
|
| 29 | |||
| 55 |