| Total Complexity | 6 | 
| Total Lines | 37 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 7 | class BdWebHost24 extends BaseProvider  | 
            ||
| 8 | { | 
            ||
| 9 | public function getUsername()  | 
            ||
| 12 | }  | 
            ||
| 13 | |||
| 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 | ];  | 
            ||
| 26 | }  | 
            ||
| 27 | |||
| 28 | public function getValidationRules()  | 
            ||
| 29 |     { | 
            ||
| 30 | return [  | 
            ||
| 31 | 'senderid' => 'required',  | 
            ||
| 32 | 'api_key' => 'required',  | 
            ||
| 33 | 'type' => 'required',  | 
            ||
| 34 |             'contacts' => 'required|regex:/^8801[3456789]\d{8}$/', | 
            ||
| 35 | 'msg' => 'required',  | 
            ||
| 36 | ];  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | public function parseResponse($response)  | 
            ||
| 44 | }  | 
            ||
| 45 | }  | 
            ||
| 46 |