@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | - $configPath = __DIR__ . '/../config/jazz-cms.php'; |
|
| 16 | + $configPath = __DIR__.'/../config/jazz-cms.php'; |
|
| 17 | 17 | $this->publishes([$configPath => $this->getConfigPath()], 'config'); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - $configPath = __DIR__ . '/../config/jazz-cms.php'; |
|
| 27 | + $configPath = __DIR__.'/../config/jazz-cms.php'; |
|
| 28 | 28 | $this->mergeConfigFrom($configPath, 'jazz-cms'); |
| 29 | 29 | |
| 30 | - $this->app->bind(JazzCMS::class, function ($app) { |
|
| 30 | + $this->app->bind(JazzCMS::class, function($app) { |
|
| 31 | 31 | return new JazzCMS; |
| 32 | 32 | }); |
| 33 | 33 | |
@@ -52,22 +52,22 @@ discard block |
||
| 52 | 52 | curl_setopt($ch, CURLOPT_URL, $this->config['base_url'].$end_point); |
| 53 | 53 | curl_setopt($ch, CURLOPT_USERAGENT, $this->config['user_agent']); |
| 54 | 54 | |
| 55 | - if (! empty($headers)) { |
|
| 55 | + if (!empty($headers)) { |
|
| 56 | 56 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $type); |
| 60 | 60 | |
| 61 | - if ($type == 'POST' && ! empty($data)) { |
|
| 61 | + if ($type == 'POST' && !empty($data)) { |
|
| 62 | 62 | curl_setopt($ch, CURLOPT_POST, 1); |
| 63 | - if (! empty($file)) { |
|
| 63 | + if (!empty($file)) { |
|
| 64 | 64 | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
| 65 | 65 | } else { |
| 66 | 66 | curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if (! empty($file)) { |
|
| 70 | + if (!empty($file)) { |
|
| 71 | 71 | curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: multipart/form-data']); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $this->response->request = ['request_size' => $requestSize, 'curl_error' => $curlError, 'base_url' => $this->config['base_url'], 'content_type' => $contentType, 'redirect_count' => $redirectCount, 'effective_url' => $effectiveUrl, 'total_time' => $totalTime]; |
| 93 | 93 | $this->response->http_code = $httpCode; |
| 94 | 94 | |
| 95 | - if (! empty($data) && ! $file) { |
|
| 95 | + if (!empty($data) && !$file) { |
|
| 96 | 96 | $this->response->data = $this->parseXmlData($result); |
| 97 | 97 | } else { |
| 98 | 98 | $this->response->data["statusmessage"] = $result; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if ($httpCode == "200" && (isset($this->response->data["statusmessage"]) && |
| 102 | 102 | in_array( |
| 103 | 103 | $this->response->data["statusmessage"], |
| 104 | - ["Message Sent Successfully!","In Process.. and check your campaign logs.", "Your Campaign runs successfully. Please check your campaign logs."] |
|
| 104 | + ["Message Sent Successfully!", "In Process.. and check your campaign logs.", "Your Campaign runs successfully. Please check your campaign logs."] |
|
| 105 | 105 | ))) { |
| 106 | 106 | $this->response->status = 'success'; |
| 107 | 107 | } else { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | public function receivingSMS($from_date = null, $to_date = null): \stdClass |
| 145 | 145 | { |
| 146 | 146 | $filter_date = ""; |
| 147 | - if (! empty($from_date) && ! empty($to_date)) { |
|
| 147 | + if (!empty($from_date) && !empty($to_date)) { |
|
| 148 | 148 | $filter_date = "<FromDate>{$from_date}</FromDate><ToDate>{$to_date}</ToDate>"; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | public function sendSMSGroups($group_name, $message): \stdClass |
| 166 | 166 | { |
| 167 | - $parameters = ['Username' => $this->config['username'], 'Password' => $this->config['password'], 'From' => $this->config['from_mask'],'Group' => $group_name, 'Message' => $message]; |
|
| 167 | + $parameters = ['Username' => $this->config['username'], 'Password' => $this->config['password'], 'From' => $this->config['from_mask'], 'Group' => $group_name, 'Message' => $message]; |
|
| 168 | 168 | $this->sendRequest('GET', '/sendsms_group.html?'.http_build_query($parameters)); |
| 169 | 169 | |
| 170 | 170 | return $this->response; |