Lint
This commit is contained in:
parent
29d068bcce
commit
c159d79487
|
@ -85,7 +85,7 @@ class MailmanService
|
||||||
return app(Paginator::class)->result(
|
return app(Paginator::class)->result(
|
||||||
fn ($page) => $this->http()->get("/lists/{$list->listId}/roster/member?page={$page}&count=10"),
|
fn ($page) => $this->http()->get("/lists/{$list->listId}/roster/member?page={$page}&count=10"),
|
||||||
function ($response) use ($list) {
|
function ($response) use ($list) {
|
||||||
throw_unless($response->ok(), MailmanServiceException::class, 'Fetching members for listId '.$list->listId.' failed.');
|
throw_unless($response->ok(), MailmanServiceException::class, 'Fetching members for listId ' . $list->listId . ' failed.');
|
||||||
/** @var array<int, array{email: string, self_link: string}>|null */
|
/** @var array<int, array{email: string, self_link: string}>|null */
|
||||||
$entries = data_get($response->json(), 'entries', []);
|
$entries = data_get($response->json(), 'entries', []);
|
||||||
throw_if(is_null($entries), MailmanServiceException::class, 'Failed getting member list from response');
|
throw_if(is_null($entries), MailmanServiceException::class, 'Failed getting member list from response');
|
||||||
|
@ -112,7 +112,7 @@ class MailmanService
|
||||||
'pre_confirmed' => 'true',
|
'pre_confirmed' => 'true',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
throw_unless(201 === $response->status(), MailmanServiceException::class, 'Adding member '.$email.' to '.$list->listId.' failed');
|
throw_unless(201 === $response->status(), MailmanServiceException::class, 'Adding member ' . $email . ' to ' . $list->listId . ' failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeMember(Member $member): void
|
public function removeMember(Member $member): void
|
||||||
|
|
Loading…
Reference in New Issue