Completed
Push — dev ( e0d2b1...8d8a40 )
by Shingo
04:16
created
src/SendGrid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function sendgrid($params)
17 17
     {
18 18
         if ($this instanceof Mailable && $this->mailDriver() == "sendgrid") {
19
-            $this->withSwiftMessage(function (Swift_Message $message) use ($params) {
19
+            $this->withSwiftMessage(function(Swift_Message $message) use ($params) {
20 20
                 $message->embed(new \Swift_Image(static::sgEncode($params), SendgridTransport::SMTP_API_NAME));
21 21
             });
22 22
         }
Please login to merge, or discard this patch.
src/Transport/SendgridTransport.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $payload = [
70 70
             'headers' => [
71
-                'Authorization' => 'Bearer ' . $this->apiKey,
71
+                'Authorization' => 'Bearer '.$this->apiKey,
72 72
                 'Content-Type' => 'application/json',
73 73
             ],
74 74
             'json' => $data,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function getPersonalizations(Swift_Mime_SimpleMessage $message)
98 98
     {
99
-        $setter = function (array $addresses) {
99
+        $setter = function(array $addresses) {
100 100
             $recipients = [];
101 101
             foreach ($addresses as $email => $name) {
102 102
                 $address = [];
@@ -293,10 +293,10 @@  discard block
 block discarded – undo
293 293
         foreach ($personalizations as $index => $params) {
294 294
             foreach ($params as $key => $val) {
295 295
                 if (in_array($key, ['to', 'cc', 'bcc'])) {
296
-                    Arr::set($data, 'personalizations.' . $index . '.' . $key, [$val]);
296
+                    Arr::set($data, 'personalizations.'.$index.'.'.$key, [$val]);
297 297
                     ++$this->numberOfRecipients;
298 298
                 } else {
299
-                    Arr::set($data, 'personalizations.' . $index . '.' . $key, $val);
299
+                    Arr::set($data, 'personalizations.'.$index.'.'.$key, $val);
300 300
                 }
301 301
             }
302 302
         }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 use GuzzleHttp\Client;
5 5
 use GuzzleHttp\ClientInterface;
6 6
 use GuzzleHttp\Exception\GuzzleException;
7
-use GuzzleHttp\Psr7\Response;
8 7
 use Illuminate\Mail\Transport\Transport;
9 8
 use Illuminate\Support\Arr;
10 9
 use Psr\Http\Message\ResponseInterface;
Please login to merge, or discard this patch.
src/SendgridTransportServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
      */
17 17
     public function register()
18 18
     {
19
-        $this->app->afterResolving(MailManager::class, function ($mail_manager) {
19
+        $this->app->afterResolving(MailManager::class, function($mail_manager) {
20 20
             /** @var $mail_manager MailManager */
21
-            $mail_manager->extend("sendgrid", function($config){
21
+            $mail_manager->extend("sendgrid", function($config) {
22 22
                 $client = new HttpClient(Arr::get($config, 'guzzle', []));
23 23
                 $endpoint = isset($config['endpoint']) ? $config['endpoint'] : null;
24 24
 
Please login to merge, or discard this patch.