Completed
Pull Request — dev (#28)
by
unknown
02:35
created
src/Transport/SendgridV3Transport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $this->client = $client;
24 24
         $this->options = [
25 25
             'headers' => [
26
-                'Authorization' => 'Bearer ' . $api_key,
26
+                'Authorization' => 'Bearer '.$api_key,
27 27
                 'Content-Type'  => 'application/json',
28 28
             ],
29 29
         ];
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     private function getPersonalizations(Swift_Mime_Message $message)
71 71
     {
72
-        $setter = function (array $addresses) {
72
+        $setter = function(array $addresses) {
73 73
             $recipients = [];
74 74
             foreach ($addresses as $email => $name) {
75 75
                 $address = [];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
         foreach ($smtp_api as $key => $val) {
205 205
 
206
-            switch($key) {
206
+            switch ($key) {
207 207
 
208 208
                 case 'personalizations':
209 209
                     $this->setPersonalizations($data, $val);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                     throw new \Exception('Sendgrid v3 now uses custom_args instead of unique_args');
214 214
 
215 215
                 case 'custom_args':
216
-                    foreach($val as $name => $value) {
216
+                    foreach ($val as $name => $value) {
217 217
                         if (!is_string($value)) {
218 218
                             throw new \Exception('Sendgrid v3 custom arguments have to be a string.');
219 219
                         }
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
         foreach ($personalizations as $index => $params) {
233 233
             foreach ($params as $key => $val) {
234 234
                 if (in_array($key, ['to', 'cc', 'bcc'])) {
235
-                    array_set($data, 'personalizations.' . $index . '.' . $key, [$val]);
235
+                    array_set($data, 'personalizations.'.$index.'.'.$key, [$val]);
236 236
                 } else {
237
-                    array_set($data, 'personalizations.' . $index . '.' . $key, $val);
237
+                    array_set($data, 'personalizations.'.$index.'.'.$key, $val);
238 238
                 }
239 239
             }
240 240
         }
Please login to merge, or discard this patch.