Passed
Push — main ( 82d62c...bd9ebe )
by Alberto
04:04
created
src/HubspotEmailChannel.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             return null;
48 48
         }
49 49
 
50
-        if (!method_exists($notification, 'toMail')) {
50
+        if ( ! method_exists($notification, 'toMail')) {
51 51
             return null;
52 52
         }
53 53
 
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
                 "hs_email_direction" => "EMAIL",
61 61
                 "hs_email_status" => "SENT",
62 62
                 "hs_email_subject" => $message->subject,
63
-                "hs_email_text" => (string)$message->render(),
63
+                "hs_email_text" => (string) $message->render(),
64 64
             ],
65 65
         ];
66 66
 
67 67
         $hubspotEmail = $this->callApi(self::HUBSPOT_URL_V3 . 'emails', 'post', $params);
68 68
 
69
-        if (!empty($hubspotEmail['id'])) {
69
+        if ( ! empty($hubspotEmail['id'])) {
70 70
 
71 71
             $this->callApi(
72
-                self::HUBSPOT_URL_V4 . 'contact/'. $hubspotContactId .'/associations/default/email/' . $hubspotEmail['id'],
72
+                self::HUBSPOT_URL_V4 . 'contact/' . $hubspotContactId . '/associations/default/email/' . $hubspotEmail['id'],
73 73
                 'put',
74 74
                 ["associationTypeId" => 197]
75 75
             );
76 76
 
77
-            if(config('hubspot.company_email_associations')) {
77
+            if (config('hubspot.company_email_associations')) {
78 78
                 $contactResp = $this->callApi(
79 79
                     self::HUBSPOT_URL_V3 . 'contacts/' . $hubspotContactId,
80 80
                     'get',
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         }
103 103
 
104 104
         $apiKey = config('hubspot.api_key');
105
-        if($apiKey){
105
+        if ($apiKey) {
106 106
             $params['hapikey'] = $apiKey;
107 107
         }
108 108
 
Please login to merge, or discard this patch.
config/hubspot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 return [
5 5
     'api_key' => env('HUBSPOT_API_KEY'),
6 6
     'access_token' => env('HUBSPOT_ACCESS_TOKEN'),
7
-    'hubspot_owner_id' => env('HUBSPOT_OWNER_ID',null),
7
+    'hubspot_owner_id' => env('HUBSPOT_OWNER_ID', null),
8 8
     /*
9 9
     *  Associate the email also with company associated to the contact
10 10
     */
Please login to merge, or discard this patch.