@@ -37,14 +37,14 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function __toString(): string |
| 39 | 39 | { |
| 40 | - return '[' . static::class . '] ' . $this->message . "\n" . |
|
| 41 | - 'Response: ' . "\n" . |
|
| 40 | + return '['.static::class.'] '.$this->message."\n". |
|
| 41 | + 'Response: '."\n". |
|
| 42 | 42 | $this->response; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | private function decodeXmlError(LibXMLError $error, string $xml): string |
| 46 | 46 | { |
| 47 | - $return = $xml[$error->line - 1] . "\n"; |
|
| 47 | + $return = $xml[$error->line - 1]."\n"; |
|
| 48 | 48 | |
| 49 | 49 | switch ($error->level) { |
| 50 | 50 | case LIBXML_ERR_WARNING: |
@@ -65,6 +65,6 @@ discard block |
||
| 65 | 65 | $return .= sprintf("\n File: %s", $error->file); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - return $return . "\n\n"; |
|
| 68 | + return $return."\n\n"; |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -22,8 +22,8 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function __toString(): string |
| 24 | 24 | { |
| 25 | - return '[' . static::class . '] ' . $this->message . "\n" . |
|
| 26 | - 'Response: ' . "\n" . |
|
| 25 | + return '['.static::class.'] '.$this->message."\n". |
|
| 26 | + 'Response: '."\n". |
|
| 27 | 27 | $this->response; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function send(Sms $sms): array |
| 82 | 82 | { |
| 83 | - if (! $sms->hasRecipients()) { |
|
| 83 | + if (!$sms->hasRecipients()) { |
|
| 84 | 84 | throw new NoRecipientsSpecifiedException(); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | ->clearRecipientVariables(); |
| 95 | 95 | |
| 96 | 96 | foreach ($chunk as $recipient) { |
| 97 | - if (! isset($sms->getRecipientVariables()[$recipient])) { |
|
| 97 | + if (!isset($sms->getRecipientVariables()[$recipient])) { |
|
| 98 | 98 | continue; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | SendMethods::TEST_CLASSIC_PLUS, |
| 162 | 162 | SendMethods::TEST_BASIC, |
| 163 | 163 | ]) |
| 164 | - ->setAllowedValues('validity_period', static function (DateInterval $value) { |
|
| 164 | + ->setAllowedValues('validity_period', static function(DateInterval $value) { |
|
| 165 | 165 | return $value->i >= ValidityPeriods::MIN && $value->i <= ValidityPeriods::MAX; |
| 166 | 166 | }) |
| 167 | 167 | ->setAllowedValues('encoding_schema', [ |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $serializedRequest = []; |
| 211 | 211 | foreach ($request as $key => $value) { |
| 212 | - $serializedRequest[] = $key . '=' . $value; |
|
| 212 | + $serializedRequest[] = $key.'='.$value; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | return implode('&', $serializedRequest); |
@@ -222,13 +222,13 @@ discard block |
||
| 222 | 222 | { |
| 223 | 223 | $recipients = $sms->getRecipients(); |
| 224 | 224 | |
| 225 | - if (! $sms->hasRecipientVariables()) { |
|
| 225 | + if (!$sms->hasRecipientVariables()) { |
|
| 226 | 226 | return json_encode(array_map([$this, 'normalizePhoneNumber'], $recipients), JSON_THROW_ON_ERROR); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | $recipientVariables = $sms->getRecipientVariables(); |
| 230 | 230 | |
| 231 | - return json_encode(array_map(function ($recipient) use ($recipientVariables) { |
|
| 231 | + return json_encode(array_map(function($recipient) use ($recipientVariables) { |
|
| 232 | 232 | $targetVariables = $recipientVariables[$recipient] ?? []; |
| 233 | 233 | |
| 234 | 234 | return array_merge(['recipient' => $this->normalizePhoneNumber($recipient)], $targetVariables); |