@@ -46,8 +46,8 @@ public function __construct(
4646 FactoryInterface $ customerFactory ,
4747 EntityManagerInterface $ customerManager ,
4848 MailChimp $ mailChimp ,
49- string $ listId
50- ) {
49+ string $ listId,
50+ ) {
5151 $ this ->customerRepository = $ customerRepository ;
5252 $ this ->customerFactory = $ customerFactory ;
5353 $ this ->customerManager = $ customerManager ;
@@ -128,14 +128,14 @@ private function exportNewEmail(string $email): void
128128 throw new BadRequestHttpException (
129129 sprintf (
130130 'Mailchimp returned false instead of response array, last error : %s ' ,
131- $ this ->mailChimp ->getLastError ()
132- )
131+ $ this ->mailChimp ->getLastError (),
132+ ),
133133 );
134134 }
135135
136136 Assert::keyExists ($ response , 'status ' );
137137
138- if ($ response ['status ' ] === Response:: HTTP_NOT_FOUND ) {
138+ if (Response:: HTTP_NOT_FOUND === $ response ['status ' ]) {
139139 $ validListIds = $ this ->getValidMailchimpListIds ();
140140 $ concatenatedList = implode (', ' , $ validListIds );
141141
@@ -144,13 +144,13 @@ private function exportNewEmail(string $email): void
144144 'Mailchimp returned %1$d code, is the MAIL_CHIMP_LIST_ID [ %2$s ] one of available ones: [ %3$s ] ? ' ,
145145 Response::HTTP_NOT_FOUND ,
146146 $ this ->listId ,
147- $ concatenatedList
148- )
147+ $ concatenatedList,
148+ ),
149149 );
150150 }
151- if ($ response [ ' status ' ] !== ' subscribed ' ) {
151+ if (' subscribed ' !== $ response [ ' status ' ] ) {
152152 throw new BadRequestHttpException (
153- sprintf ('Response status is %s instead of %s ' , $ response ['status ' ], 'subscribed ' )
153+ sprintf ('Response status is %s instead of %s ' , $ response ['status ' ], 'subscribed ' ),
154154 );
155155 }
156156 }
@@ -174,8 +174,8 @@ protected function addMailchimpData(string $email): void
174174 throw new BadRequestHttpException (
175175 sprintf (
176176 'Mailchimp returned false instead of response array, last error : %s ' ,
177- $ this ->mailChimp ->getLastError ()
178- )
177+ $ this ->mailChimp ->getLastError (),
178+ ),
179179 );
180180 }
181181
0 commit comments