@@ -4,7 +4,7 @@ |
||
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 | */ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return null; |
46 | 46 | } |
47 | 47 | |
48 | - if (! method_exists($notification, 'toMail')) { |
|
48 | + if ( ! method_exists($notification, 'toMail')) { |
|
49 | 49 | return null; |
50 | 50 | } |
51 | 51 | |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | "hs_email_direction" => "EMAIL", |
59 | 59 | "hs_email_status" => "SENT", |
60 | 60 | "hs_email_subject" => $message->subject, |
61 | - "hs_email_text" => (string)$message->render(), |
|
61 | + "hs_email_text" => (string) $message->render(), |
|
62 | 62 | ], |
63 | 63 | ]; |
64 | 64 | |
65 | 65 | $hubspotEmail = $this->callApi(self::HUBSPOT_URL_V3 . 'emails', 'post', $params); |
66 | 66 | |
67 | - if (! empty($hubspotEmail['id'])) { |
|
67 | + if ( ! empty($hubspotEmail['id'])) { |
|
68 | 68 | |
69 | 69 | $this->callApi( |
70 | - self::HUBSPOT_URL_V4 . 'contact/'. $hubspotContactId .'/associations/default/email/' . $hubspotEmail['id'], |
|
70 | + self::HUBSPOT_URL_V4 . 'contact/' . $hubspotContactId . '/associations/default/email/' . $hubspotEmail['id'], |
|
71 | 71 | 'put', |
72 | 72 | ["associationTypeId" => 197] |
73 | 73 | ); |
74 | 74 | |
75 | - if(config('hubspot.company_email_associations')) { |
|
75 | + if (config('hubspot.company_email_associations')) { |
|
76 | 76 | $contactResp = $this->callApi( |
77 | 77 | self::HUBSPOT_URL_V3 . 'contacts/' . $hubspotContactId, |
78 | 78 | 'get', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | $apiKey = config('hubspot.api_key'); |
104 | - if($apiKey) { |
|
104 | + if ($apiKey) { |
|
105 | 105 | $params['hapikey'] = $apiKey; |
106 | 106 | } |
107 | 107 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $response = $http->$method($baseUrl, $params); |
118 | 118 | |
119 | 119 | if ($response->failed()) { |
120 | - throw CouldNotSendNotification::serviceRespondedWithAnError($baseUrl.' '.$response->status().' '.$response->body()); |
|
120 | + throw CouldNotSendNotification::serviceRespondedWithAnError($baseUrl . ' ' . $response->status() . ' ' . $response->body()); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | return $response->json(); |