@@ -34,7 +34,7 @@ |
||
34 | 34 | // Automatically apply the package configuration |
35 | 35 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'netgsm'); |
36 | 36 | |
37 | - $this->app->singleton(Netgsm::class, function ($app) { |
|
37 | + $this->app->singleton(Netgsm::class, function($app) { |
|
38 | 38 | $config = config('netgsm'); |
39 | 39 | |
40 | 40 | if (is_null($config)) { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | if (count($filters) > 0) { |
87 | 87 | foreach ($filters as $filter => $value) { |
88 | - if (! method_exists($report, 'set'.$filter)) { |
|
88 | + if (!method_exists($report, 'set'.$filter)) { |
|
89 | 89 | continue; |
90 | 90 | } |
91 | 91 |
@@ -65,8 +65,8 @@ |
||
65 | 65 | 'gsmno' => implode(',', $this->recipients), |
66 | 66 | 'msgheader' => $this->header ?? $this->defaults['header'], |
67 | 67 | 'message' => $this->message, |
68 | - 'startdate' => ! empty($this->startDate) ? $this->startDate->format('dmYHi') : null, |
|
69 | - 'stopdate' => ! empty($this->endDate) ? $this->endDate->format('dmYHi') : null, |
|
68 | + 'startdate' => !empty($this->startDate) ? $this->startDate->format('dmYHi') : null, |
|
69 | + 'stopdate' => !empty($this->endDate) ? $this->endDate->format('dmYHi') : null, |
|
70 | 70 | 'izin' => (int) $this->isAuthorizedData(), |
71 | 71 | ]; |
72 | 72 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function setRecipients($recipients) |
132 | 132 | { |
133 | - if (! is_array($recipients)) { |
|
133 | + if (!is_array($recipients)) { |
|
134 | 134 | $this->recipients = explode(',', $recipients); |
135 | 135 | } else { |
136 | 136 | $this->recipients = $recipients; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function setSendMethod(string $sendMethod): self |
210 | 210 | { |
211 | - if (! in_array($sendMethod, $this->sendMethods)) { |
|
211 | + if (!in_array($sendMethod, $this->sendMethods)) { |
|
212 | 212 | throw new Exception(trans('method_not_allowed', ['method' => $sendMethod])); |
213 | 213 | } |
214 | 214 | |
@@ -323,17 +323,17 @@ discard block |
||
323 | 323 | { |
324 | 324 | $result = explode(' ', $this->response); |
325 | 325 | |
326 | - if (! isset($result[0])) { |
|
326 | + if (!isset($result[0])) { |
|
327 | 327 | throw new CouldNotSendNotification(NetgsmErrors::NETGSM_GENERAL_ERROR); |
328 | 328 | } |
329 | 329 | |
330 | 330 | $code = $result[0]; |
331 | - if (! in_array($code, self::SUCCESS_CODES)) { |
|
331 | + if (!in_array($code, self::SUCCESS_CODES)) { |
|
332 | 332 | $message = $this->errorCodes[$code] ?? NetgsmErrors::SYSTEM_ERROR; |
333 | 333 | throw new CouldNotSendNotification($message); |
334 | 334 | } |
335 | 335 | |
336 | - if (! isset($result[1])) { |
|
336 | + if (!isset($result[1])) { |
|
337 | 337 | throw new NetgsmException(NetgsmErrors::JOB_ID_NOT_FOUND); |
338 | 338 | } |
339 | 339 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | $code = $result[0]; |
53 | 53 | |
54 | - if (! in_array($code, $this->successCodes)) { |
|
54 | + if (!in_array($code, $this->successCodes)) { |
|
55 | 55 | $message = $this->errorCodes[$code] ?? NetgsmErrors::SYSTEM_ERROR; |
56 | 56 | throw new NetgsmException($message, $code); |
57 | 57 | } |
@@ -31,11 +31,11 @@ |
||
31 | 31 | { |
32 | 32 | $message = $notification->toNetgsm($notifiable); |
33 | 33 | |
34 | - if (! $message instanceof AbstractNetgsmMessage) { |
|
34 | + if (!$message instanceof AbstractNetgsmMessage) { |
|
35 | 35 | throw new Exception(trans('netgsm::errors.invalid_netgsm_message')); |
36 | 36 | } |
37 | 37 | |
38 | - if (! $message->getRecipients()) { |
|
38 | + if (!$message->getRecipients()) { |
|
39 | 39 | $phone = $notifiable->routeNotificationFor('Netgsm'); |
40 | 40 | $message->setRecipients($phone); |
41 | 41 | } |