@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | SendMethods::TEST_CLASSIC_PLUS, |
110 | 110 | SendMethods::TEST_BASIC, |
111 | 111 | ]) |
112 | - ->setAllowedValues('delivery_start', function ($value) { |
|
112 | + ->setAllowedValues('delivery_start', function($value) { |
|
113 | 113 | $d = \DateTime::createFromFormat(\DateTime::RFC2822, $value); |
114 | 114 | return $d && $d->format('Y-m-d') === $value; |
115 | 115 | }) |
116 | - ->setAllowedValues('validity_period', function ($value) { |
|
116 | + ->setAllowedValues('validity_period', function($value) { |
|
117 | 117 | return $value >= ValidityPeriods::MIN && $value <= 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 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | 'username' => $this->config['username'], |
151 | 151 | 'password' => $this->config['password'], |
152 | 152 | 'method' => $this->config['method'], |
153 | - 'sender_number' => '"' . $this->normalizePhoneNumber($this->config['sender_number']) . '"', |
|
153 | + 'sender_number' => '"'.$this->normalizePhoneNumber($this->config['sender_number']).'"', |
|
154 | 154 | 'recipients' => $this->prepareRecipients($sms), |
155 | 155 | 'text' => str_replace(' ', '+', $sms->getText()), |
156 | 156 | 'user_reference' => $sms->getUserReference(), |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $serializedRequest = ""; |
164 | 164 | foreach ($request as $key => $value) { |
165 | - $serializedRequest .= $key . '=' . $value . '&'; |
|
165 | + $serializedRequest .= $key.'='.$value.'&'; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | return rtrim($serializedRequest, '&'); |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | { |
178 | 178 | $recipients = $sms->getRecipients(); |
179 | 179 | |
180 | - if (! $sms->hasRecipientVariables()) { |
|
180 | + if (!$sms->hasRecipientVariables()) { |
|
181 | 181 | $recipients = array_map([$this, 'normalizePhoneNumber'], $recipients); |
182 | 182 | return json_encode($recipients); |
183 | 183 | } |
184 | 184 | |
185 | 185 | $recipientVariables = $sms->getRecipientVariables(); |
186 | 186 | |
187 | - return json_encode(array_map(function ($recipient) use ($recipientVariables) { |
|
187 | + return json_encode(array_map(function($recipient) use ($recipientVariables) { |
|
188 | 188 | $targetVariables = $recipientVariables[$recipient]; |
189 | 189 | |
190 | 190 | return array_merge(['recipient' => $this->normalizePhoneNumber($recipient)], $targetVariables); |