@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function send(Sms $sms) |
50 | 50 | { |
51 | - if (! $sms->hasRecipients()) { |
|
51 | + if (!$sms->hasRecipients()) { |
|
52 | 52 | throw new NoRecipientsSpecifiedException(); |
53 | 53 | } |
54 | 54 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ; |
64 | 64 | |
65 | 65 | foreach ($chunk as $recipient) { |
66 | - if (! isset($sms->getRecipientVariables()[$recipient])) { |
|
66 | + if (!isset($sms->getRecipientVariables()[$recipient])) { |
|
67 | 67 | continue; |
68 | 68 | } |
69 | 69 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | SendMethods::TEST_CLASSIC_PLUS, |
128 | 128 | SendMethods::TEST_BASIC, |
129 | 129 | ]) |
130 | - ->setAllowedValues('validity_period', function (\DateInterval $value) { |
|
130 | + ->setAllowedValues('validity_period', function(\DateInterval $value) { |
|
131 | 131 | return $value->i >= ValidityPeriods::MIN && $value->i <= ValidityPeriods::MAX; |
132 | 132 | }) |
133 | 133 | ->setAllowedValues('encoding_schema', [ |
@@ -191,14 +191,14 @@ discard block |
||
191 | 191 | { |
192 | 192 | $recipients = $sms->getRecipients(); |
193 | 193 | |
194 | - if (! $sms->hasRecipientVariables()) { |
|
194 | + if (!$sms->hasRecipientVariables()) { |
|
195 | 195 | $recipients = array_map([$this, 'normalizePhoneNumber'], $recipients); |
196 | 196 | return json_encode($recipients); |
197 | 197 | } |
198 | 198 | |
199 | 199 | $recipientVariables = $sms->getRecipientVariables(); |
200 | 200 | |
201 | - return json_encode(array_map(function ($recipient) use ($recipientVariables) { |
|
201 | + return json_encode(array_map(function($recipient) use ($recipientVariables) { |
|
202 | 202 | $targetVariables = []; |
203 | 203 | if (isset($recipientVariables[$recipient])) { |
204 | 204 | $targetVariables = $recipientVariables[$recipient]; |
@@ -45,22 +45,22 @@ |
||
45 | 45 | |
46 | 46 | $doc = simplexml_load_string($rawResponse); |
47 | 47 | foreach (SendMethods::all() as $method) { |
48 | - if (! isset($doc->$method)) { |
|
48 | + if (!isset($doc->$method)) { |
|
49 | 49 | continue; |
50 | 50 | } |
51 | 51 | |
52 | 52 | $element = $doc->$method; |
53 | 53 | |
54 | - if (! isset($element->status)) { |
|
54 | + if (!isset($element->status)) { |
|
55 | 55 | throw new UnknownErrorResponseException("Missing response status value from Skebby"); |
56 | 56 | } |
57 | 57 | |
58 | - $this->status = (string)$element->status; |
|
59 | - $this->messageId = isset($element->id) ? (string)$element->id : null; |
|
58 | + $this->status = (string) $element->status; |
|
59 | + $this->messageId = isset($element->id) ? (string) $element->id : null; |
|
60 | 60 | |
61 | - if (! $this->isSuccessful()) { |
|
62 | - $this->code = isset($element->code) ? (string)$element->code : null; |
|
63 | - $this->errorMessage = isset($element->message) ? (string)$element->message : 'Unknown error'; |
|
61 | + if (!$this->isSuccessful()) { |
|
62 | + $this->code = isset($element->code) ? (string) $element->code : null; |
|
63 | + $this->errorMessage = isset($element->message) ? (string) $element->message : 'Unknown error'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | return; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function hasRecipients() |
114 | 114 | { |
115 | - return ! empty($this->recipients); |
|
115 | + return !empty($this->recipients); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function addRecipientVariable($recipient, $recipientVariable, $recipientVariableValue) |
147 | 147 | { |
148 | - if (! isset($this->recipientVariables[$recipient])) { |
|
148 | + if (!isset($this->recipientVariables[$recipient])) { |
|
149 | 149 | $this->recipientVariables[$recipient] = []; |
150 | 150 | } |
151 | 151 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function hasRecipientVariables() |
174 | 174 | { |
175 | - return ! empty($this->recipientVariables); |
|
175 | + return !empty($this->recipientVariables); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function setDeliveryStart(\DateTime $deliveryStart = null) |
244 | 244 | { |
245 | - if (null !== $deliveryStart && $deliveryStart < date_create_from_format('U', (string)time())) { |
|
245 | + if (null !== $deliveryStart && $deliveryStart < date_create_from_format('U', (string) time())) { |
|
246 | 246 | throw new InvalidDeliveryStartException(); |
247 | 247 | } |
248 | 248 |