Skip to content

Commit 667c6e5

Browse files
committed
Fix code style
1 parent c8a6a76 commit 667c6e5

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

src/DI/MailChimpExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct()
6060
public function getConfigSchema() : Schema
6161
{
6262
return Expect::from($this->config)->before(
63-
function (array $config) : array {
63+
function (array $config) : array {
6464
if (true === ($config['findDataCenter'] ?? $this->config->findDataCenter)) {
6565
// unable to find, possible use of neon parameter, which will be expanded later
6666
$config['apiUrl'] = $this->config->apiUrlTemplate;
@@ -113,7 +113,7 @@ public function loadConfiguration(bool $validateConfig = true) : void
113113

114114
if ($this->config->findDataCenter === true) {
115115
$accountDataCenter = Strings::match($this->config->apiKey, '~-(us(?:\d+))$~');
116-
assert($accountDataCenter !== null);
116+
assert($accountDataCenter !== null);
117117
$this->config->apiUrl = sprintf($this->config->apiUrlTemplate, $accountDataCenter[1], MailChimp\Request::VERSION);
118118
}
119119

src/Group/Lists.php

+23-23
Original file line numberDiff line numberDiff line change
@@ -192,25 +192,25 @@ public function removeMember(MemberItem $memberItem) : ?array
192192
}
193193
}
194194

195-
/**
196-
* @throws JsonException
197-
* @throws MemberNotFoundException
198-
* @throws RequestException
199-
*/
200-
public function removePermanentMember(MemberItem $memberItem) : ?array
201-
{
202-
try {
203-
return $this->apiRequest->post($this->getDeleteOneMemberPermanentEndpointPath($memberItem->list_id, $memberItem->id), []);
204-
} catch (ClientException $clientException) {
205-
throw new MemberNotFoundException("Member '{$memberItem->id}' not found in the list '{$memberItem->list_id}'", $clientException);
206-
} catch (RequestException $requestException) {
207-
if ($requestException->getCode() === 204) {
208-
return null;
209-
}
210-
211-
throw $requestException;
212-
}
213-
}
195+
/**
196+
* @throws JsonException
197+
* @throws MemberNotFoundException
198+
* @throws RequestException
199+
*/
200+
public function removePermanentMember(MemberItem $memberItem) : ?array
201+
{
202+
try {
203+
return $this->apiRequest->post($this->getDeleteOneMemberPermanentEndpointPath($memberItem->list_id, $memberItem->id), []);
204+
} catch (ClientException $clientException) {
205+
throw new MemberNotFoundException("Member '{$memberItem->id}' not found in the list '{$memberItem->list_id}'", $clientException);
206+
} catch (RequestException $requestException) {
207+
if ($requestException->getCode() === 204) {
208+
return null;
209+
}
210+
211+
throw $requestException;
212+
}
213+
}
214214

215215
/**
216216
* @throws JsonException
@@ -329,10 +329,10 @@ private function getOneMemberEndpointPath(string $listId, string $memberHash) :
329329
return $this->getMemberEndpointPath($listId) . "/{$memberHash}";
330330
}
331331

332-
private function getDeleteOneMemberPermanentEndpointPath(string $listId, string $memberHash) : string
333-
{
334-
return $this->getOneMemberEndpointPath($listId, $memberHash) . "/actions/delete-permanent";
335-
}
332+
private function getDeleteOneMemberPermanentEndpointPath(string $listId, string $memberHash) : string
333+
{
334+
return $this->getOneMemberEndpointPath($listId, $memberHash) . '/actions/delete-permanent';
335+
}
336336

337337
private function getSegmentEndpointPath(string $listId) : string
338338
{

0 commit comments

Comments
 (0)