| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function mapParams($recipient, $message, array $params = []) |
||
| 15 | { |
||
| 16 | if (!preg_match($this->recipientPattern, $recipient, $matches)) { |
||
| 17 | return []; |
||
| 18 | } |
||
| 19 | |||
| 20 | $recipient = '880'.$matches[3]; |
||
| 21 | |||
| 22 | return [ |
||
| 23 | 'contacts' => $recipient, |
||
| 24 | 'msg' => urlencode(preg_replace('/[^a-zA-Z0-9\.@!?&\-,%\(\):\"]/', ' ', $message)), |
||
| 25 | ]; |
||
| 46 |