@@ -59,7 +59,7 @@ |
||
59 | 59 | private function loadConfigFromFile() |
60 | 60 | { |
61 | 61 | $this->configName = !is_null($this->configName) ? $this->configName : get_class($this); |
62 | - $this->config = Config::get('sms-service-with-bd-providers::config.providers.'.$this->configName); |
|
62 | + $this->config = Config::get('sms-service-with-bd-providers::config.providers.' . $this->configName); |
|
63 | 63 | |
64 | 64 | $this->extractUrlFromConfigAndSet(); |
65 | 65 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return []; |
18 | 18 | } |
19 | 19 | |
20 | - $recipient = '0'.$matches[3]; |
|
20 | + $recipient = '0' . $matches[3]; |
|
21 | 21 | |
22 | 22 | return [ |
23 | 23 | 'type' => $this->config['type'], |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return []; |
26 | 26 | } |
27 | 27 | |
28 | - $recipient = '880'.$matches[3]; |
|
28 | + $recipient = '880' . $matches[3]; |
|
29 | 29 | $clientRefId = !array_key_exists('id', $params) ? uniqid() : $params['id']; |
30 | 30 | |
31 | 31 | return [ |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return []; |
18 | 18 | } |
19 | 19 | |
20 | - $recipient = '880'.$matches[3]; |
|
20 | + $recipient = '880' . $matches[3]; |
|
21 | 21 | |
22 | 22 | return [ |
23 | 23 | 'contacts' => $recipient, |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function getUrl() |
27 | 27 | { |
28 | - return parent::getUrl().'/sendsms'; |
|
28 | + return parent::getUrl() . '/sendsms'; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function getUsername() |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return []; |
40 | 40 | } |
41 | 41 | |
42 | - $recipient = '880'.$matches[3]; |
|
42 | + $recipient = '880' . $matches[3]; |
|
43 | 43 | |
44 | 44 | if (!array_key_exists('coding', $this->config) || $this->config['coding'] != 3) { |
45 | 45 | $message = preg_replace('/[^a-zA-Z0-9\.@!?&\-,%\(\):\"]/', ' ', $message); |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | return Cache::get($cacheKey); |
79 | 79 | } |
80 | 80 | |
81 | - $api = $this->url.'/api/sendsms/token?action=generate'; |
|
81 | + $api = $this->url . '/api/sendsms/token?action=generate'; |
|
82 | 82 | $request = [ |
83 | 83 | 'headers' => [ |
84 | - 'Authorization' => ['Basic '.base64_encode($this->config['username'].':'.$this->config['password'])], |
|
84 | + 'Authorization' => ['Basic ' . base64_encode($this->config['username'] . ':' . $this->config['password'])], |
|
85 | 85 | ], |
86 | 86 | ]; |
87 | 87 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | if (200 === $response->getStatusCode()) { |
95 | 95 | $responseData = $this->parseJson($response); |
96 | - $api = $this->url.'/api/sendsms/token?action=enable&token=all'; |
|
96 | + $api = $this->url . '/api/sendsms/token?action=enable&token=all'; |
|
97 | 97 | $request['form_params'] = ['token' => $responseData['token']]; |
98 | 98 | $response = $this->makeRequestWithHandlingException($client, $method = 'post', $api, $request); |
99 | 99 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return []; |
18 | 18 | } |
19 | 19 | |
20 | - $recipient = '880'.$matches[3]; |
|
20 | + $recipient = '880' . $matches[3]; |
|
21 | 21 | |
22 | 22 | return [ |
23 | 23 | 'receiver' => $recipient, |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return []; |
18 | 18 | } |
19 | 19 | |
20 | - $recipient = '880'.$matches[3]; |
|
20 | + $recipient = '880' . $matches[3]; |
|
21 | 21 | |
22 | 22 | return [ |
23 | 23 | 'msisdn' => $recipient, |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return []; |
18 | 18 | } |
19 | 19 | |
20 | - $recipient = '0'.$matches[3]; |
|
20 | + $recipient = '0' . $matches[3]; |
|
21 | 21 | |
22 | 22 | return [ |
23 | 23 | 'msisdn' => $recipient, |
@@ -20,7 +20,7 @@ |
||
20 | 20 | return []; |
21 | 21 | } |
22 | 22 | |
23 | - $recipient = '880'.$matches[3]; |
|
23 | + $recipient = '880' . $matches[3]; |
|
24 | 24 | |
25 | 25 | return [ |
26 | 26 | 'To' => $recipient, |