@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | ; |
| 53 | 53 | |
| 54 | 54 | foreach ($chunk as $recipient) { |
| 55 | - if (! isset($sms->getRecipientVariables()[$recipient])) { |
|
| 55 | + if (!isset($sms->getRecipientVariables()[$recipient])) { |
|
| 56 | 56 | continue; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | SendMethods::TEST_CLASSIC_PLUS, |
| 114 | 114 | SendMethods::TEST_BASIC, |
| 115 | 115 | ]) |
| 116 | - ->setAllowedValues('validity_period', function (\DateInterval $value) { |
|
| 116 | + ->setAllowedValues('validity_period', function(\DateInterval $value) { |
|
| 117 | 117 | return $value->i >= ValidityPeriods::MIN && $value->i <= ValidityPeriods::MAX; |
| 118 | 118 | }) |
| 119 | 119 | ->setAllowedValues('encoding_schema', [ |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | private function prepareRequest(Sms $sms) |
| 144 | 144 | { |
| 145 | - if (! $sms->hasRecipients()) { |
|
| 145 | + if (!$sms->hasRecipients()) { |
|
| 146 | 146 | throw new NoRecipientsSpecifiedException(); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | 'username' => $this->config['username'], |
| 161 | 161 | 'password' => $this->config['password'], |
| 162 | 162 | 'method' => $this->config['method'], |
| 163 | - 'sender_number' => '"' . $this->normalizePhoneNumber($this->config['sender_number']) . '"', |
|
| 163 | + 'sender_number' => '"'.$this->normalizePhoneNumber($this->config['sender_number']).'"', |
|
| 164 | 164 | 'recipients' => $this->prepareRecipients($sms), |
| 165 | 165 | 'text' => str_replace(' ', '+', $sms->getText()), |
| 166 | 166 | 'user_reference' => $sms->getUserReference(), |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | $serializedRequest = ""; |
| 174 | 174 | foreach ($request as $key => $value) { |
| 175 | - $serializedRequest .= $key . '=' . $value . '&'; |
|
| 175 | + $serializedRequest .= $key.'='.$value.'&'; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return rtrim($serializedRequest, '&'); |
@@ -187,14 +187,14 @@ discard block |
||
| 187 | 187 | { |
| 188 | 188 | $recipients = $sms->getRecipients(); |
| 189 | 189 | |
| 190 | - if (! $sms->hasRecipientVariables()) { |
|
| 190 | + if (!$sms->hasRecipientVariables()) { |
|
| 191 | 191 | $recipients = array_map([$this, 'normalizePhoneNumber'], $recipients); |
| 192 | 192 | return json_encode($recipients); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $recipientVariables = $sms->getRecipientVariables(); |
| 196 | 196 | |
| 197 | - return json_encode(array_map(function ($recipient) use ($recipientVariables) { |
|
| 197 | + return json_encode(array_map(function($recipient) use ($recipientVariables) { |
|
| 198 | 198 | $targetVariables = $recipientVariables[$recipient]; |
| 199 | 199 | |
| 200 | 200 | return array_merge(['recipient' => $this->normalizePhoneNumber($recipient)], $targetVariables); |