Completed
Pull Request — master (#10)
by Massimiliano
02:59
created
lib/DataStructure/Response.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,20 +62,20 @@
 block discarded – undo
62 62
         }
63 63
 
64 64
         foreach (SendMethods::all() as $method) {
65
-            if (! isset($doc->$method)) {
65
+            if (!isset($doc->$method)) {
66 66
                 continue;
67 67
             }
68 68
 
69 69
             $element = $doc->$method;
70 70
 
71
-            if (! isset($element->status)) {
71
+            if (!isset($element->status)) {
72 72
                 throw new UnknownErrorResponseException('Missing response status value from Skebby', $rawResponse);
73 73
             }
74 74
 
75 75
             $this->status = (string) $element->status;
76 76
             $this->messageId = isset($element->id) ? (string) $element->id : null;
77 77
 
78
-            if (! $this->isSuccessful()) {
78
+            if (!$this->isSuccessful()) {
79 79
                 $this->code = isset($element->code) ? (string) $element->code : null;
80 80
                 $this->errorMessage = isset($element->message) ? (string) $element->message : 'Unknown error';
81 81
             }
Please login to merge, or discard this patch.
lib/DataStructure/Sms.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function hasRecipients(): bool
158 158
     {
159
-        return ! empty($this->recipients);
159
+        return !empty($this->recipients);
160 160
     }
161 161
 
162 162
     /**
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         string $recipientVariable,
199 199
         string $recipientVariableValue
200 200
     ): self {
201
-        if (! isset($this->recipientVariables[$recipient])) {
201
+        if (!isset($this->recipientVariables[$recipient])) {
202 202
             $this->recipientVariables[$recipient] = [];
203 203
         }
204 204
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function hasRecipientVariables(): bool
231 231
     {
232
-        return ! empty($this->recipientVariables);
232
+        return !empty($this->recipientVariables);
233 233
     }
234 234
 
235 235
     /**
Please login to merge, or discard this patch.
lib/Client/Client.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function send(Sms $sms): array
70 70
     {
71
-        if (! $sms->hasRecipients()) {
71
+        if (!$sms->hasRecipients()) {
72 72
             throw new NoRecipientsSpecifiedException();
73 73
         }
74 74
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             ;
84 84
 
85 85
             foreach ($chunk as $recipient) {
86
-                if (! isset($sms->getRecipientVariables()[$recipient])) {
86
+                if (!isset($sms->getRecipientVariables()[$recipient])) {
87 87
                     continue;
88 88
                 }
89 89
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 SendMethods::TEST_CLASSIC_PLUS,
148 148
                 SendMethods::TEST_BASIC,
149 149
             ])
150
-            ->setAllowedValues('validity_period', function (\DateInterval $value) {
150
+            ->setAllowedValues('validity_period', function(\DateInterval $value) {
151 151
                 return $value->i >= ValidityPeriods::MIN && $value->i <= ValidityPeriods::MAX;
152 152
             })
153 153
             ->setAllowedValues('encoding_schema', [
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     {
218 218
         $recipients = $sms->getRecipients();
219 219
 
220
-        if (! $sms->hasRecipientVariables()) {
220
+        if (!$sms->hasRecipientVariables()) {
221 221
             $recipients = array_map([$this, 'normalizePhoneNumber'], $recipients);
222 222
 
223 223
             return json_encode($recipients);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $recipientVariables = $sms->getRecipientVariables();
227 227
 
228
-        return json_encode(array_map(function ($recipient) use ($recipientVariables) {
228
+        return json_encode(array_map(function($recipient) use ($recipientVariables) {
229 229
             $targetVariables = [];
230 230
             if (isset($recipientVariables[$recipient])) {
231 231
                 $targetVariables = $recipientVariables[$recipient];
Please login to merge, or discard this patch.