@@ -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, |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function boot() |
| 10 | 10 | { |
| 11 | 11 | $this->package('sarahman/sms-service-with-bd-providers', null, __DIR__); |
| 12 | - $this->package('sarahman/laravel-http-request-api-log', null, __DIR__.'/../../laravel-http-request-api-log/src'); |
|
| 12 | + $this->package('sarahman/laravel-http-request-api-log', null, __DIR__ . '/../../laravel-http-request-api-log/src'); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | public function register() |
@@ -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 | 'csms_id' => isset($params['csms_id']) ? $params['csms_id'] : rand(100000, 999999), |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | throw new Exception($response->getResponseString(), 500); |
| 153 | 153 | } |
| 154 | 154 | } catch (Exception $e) { |
| 155 | - Log::error('Curl error response: '.$e->getMessage()); |
|
| 155 | + Log::error('Curl error response: ' . $e->getMessage()); |
|
| 156 | 156 | |
| 157 | 157 | throw $e; |
| 158 | 158 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | 'timeout' => 30, |
| 187 | 187 | ]; |
| 188 | 188 | |
| 189 | - switch(get_class($this->provider)) { |
|
| 189 | + switch (get_class($this->provider)) { |
|
| 190 | 190 | case self::PROVIDER_GRAMEENPHONE: |
| 191 | 191 | case self::PROVIDER_NOVOCOM: |
| 192 | 192 | $options += [ |
@@ -201,8 +201,8 @@ discard block |
||
| 201 | 201 | 'httpheader' => [ |
| 202 | 202 | 'Content-Type: application/json', |
| 203 | 203 | 'Accept: application/json', |
| 204 | - 'user_id:'.$data['user_id'], |
|
| 205 | - 'password:'.$data['password'], |
|
| 204 | + 'user_id:' . $data['user_id'], |
|
| 205 | + 'password:' . $data['password'], |
|
| 206 | 206 | ], |
| 207 | 207 | 'post' => 1, |
| 208 | 208 | 'postfields' => json_encode($data), |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | $options += [ |
| 215 | 215 | 'httpheader' => [ |
| 216 | 216 | 'Content-Type: application/json', |
| 217 | - 'Content-Length: '.strlen($encodedData), |
|
| 217 | + 'Content-Length: ' . strlen($encodedData), |
|
| 218 | 218 | 'Accept: application/json', |
| 219 | 219 | ], |
| 220 | 220 | 'customrequest' => 'POST', |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | if ($this->provider instanceof NeedsAuthenticationInterface) { |
| 234 | - $options['httpheader'][] = 'Authorization: Bearer '.$this->provider->getAccessToken(); |
|
| 234 | + $options['httpheader'][] = 'Authorization: Bearer ' . $this->provider->getAccessToken(); |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | return $options; |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | isset($options['returntransfer']) || $options['returntransfer'] = true; |
| 251 | 251 | |
| 252 | 252 | foreach ($options as $key => $value) { |
| 253 | - $option = 'CURLOPT_'.strtoupper($key); |
|
| 253 | + $option = 'CURLOPT_' . strtoupper($key); |
|
| 254 | 254 | $curlOptions[constant($option)] = $value; |
| 255 | 255 | } |
| 256 | 256 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | if ($response != true) { |
| 264 | 264 | $errorNumber = curl_errno($ch); |
| 265 | - $eMsg = 'cURL Error # '.$errorNumber.' | cURL Error Message: '.curl_error($ch); |
|
| 265 | + $eMsg = 'cURL Error # ' . $errorNumber . ' | cURL Error Message: ' . curl_error($ch); |
|
| 266 | 266 | |
| 267 | 267 | curl_close($ch); |
| 268 | 268 | |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $response = curl_exec($ch); |
| 276 | 276 | |
| 277 | 277 | if ($response != true) { |
| 278 | - $eMsg = 'cURL Error # '.curl_errno($ch).' | cURL Error Message: '.curl_error($ch); |
|
| 278 | + $eMsg = 'cURL Error # ' . curl_errno($ch) . ' | cURL Error Message: ' . curl_error($ch); |
|
| 279 | 279 | |
| 280 | 280 | curl_close($ch); |
| 281 | 281 | |