@@ -129,7 +129,7 @@ |
||
129 | 129 | |
130 | 130 | $resource = $this->baseuri . $resource; |
131 | 131 | |
132 | - $this->logRequest($method, $resource , $options); |
|
132 | + $this->logRequest($method, $resource, $options); |
|
133 | 133 | |
134 | 134 | try { |
135 | 135 | $response = $this->client->request($method, $resource, $options); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | throw new \Exception('The Mailchimp API key is not properly set. Please verify the apikey configuration.'); |
51 | 51 | } |
52 | 52 | |
53 | - $response = LarachimpFacade::request('GET', 'lists/'.$this->listId, [ |
|
53 | + $response = LarachimpFacade::request('GET', 'lists/' . $this->listId, [ |
|
54 | 54 | 'query' => ['fields' => 'id,web_id,name'], |
55 | 55 | ]); |
56 | 56 | if (empty($response)) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function addListMember(LarachimpListMember $member) |
102 | 102 | { |
103 | - return LarachimpFacade::request('POST', 'lists/'.$this->listId.'/members', [ |
|
103 | + return LarachimpFacade::request('POST', 'lists/' . $this->listId . '/members', [ |
|
104 | 104 | 'body' => json_encode([ |
105 | 105 | 'email_address' => $member->getEmail(), |
106 | 106 | 'status' => $member->isSubscribedToMailchimpList() ? 'subscribed' : 'unsubscribed', |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function updateListMember(LarachimpListMember $member, $subscriberHash) |
121 | 121 | { |
122 | - return LarachimpFacade::request('PATCH', 'lists/'.$this->listId.'/members/'.$subscriberHash, [ |
|
122 | + return LarachimpFacade::request('PATCH', 'lists/' . $this->listId . '/members/' . $subscriberHash, [ |
|
123 | 123 | 'body' => json_encode([ |
124 | 124 | 'status' => $member->isSubscribedToMailchimpList() ? 'subscribed' : 'unsubscribed', |
125 | 125 | ]), |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $mailchimpListMember = $this->searchMember($member); |
144 | 144 | |
145 | 145 | if ($this->log) { |
146 | - $this->log->info('Member Found = '.var_export($mailchimpListMember, true)); |
|
146 | + $this->log->info('Member Found = ' . var_export($mailchimpListMember, true)); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | if (empty($mailchimpListMember)) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register() |
27 | 27 | { |
28 | - $this->app->singleton('diegocaprioli_larachimp', function ($app) { |
|
28 | + $this->app->singleton('diegocaprioli_larachimp', function($app) { |
|
29 | 29 | $config = config('diegocaprioli.larachimp.larachimp'); |
30 | 30 | $larachimp = new Larachimp($app->make('log')); |
31 | 31 | $larachimp->initialize($config['apikey'], $config['baseuri']); |