Minor cleanup and cs (#550)

* Minor cleanup and cs

* minor
This commit is contained in:
Tobias Nyholm 2019-01-23 10:35:58 +01:00 committed by GitHub
parent a79b8bb86f
commit cbb13527b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 3 additions and 12 deletions

View File

@ -28,7 +28,6 @@ class Bounce
public static function create(array $data): self
{
$model = new self();
$model->address = $data['address'] ?? null;
$model->code = $data['code'] ?? null;
$model->error = $data['error'] ?? null;

View File

@ -38,7 +38,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
$model = new self();
$model->items = $bounces;
$model->paging = $data['paging'];

View File

@ -26,7 +26,6 @@ class Complaint
public static function create(array $data): self
{
$model = new self();
$model->address = $data['address'] ?? null;
$model->createdAt = isset($data['created_at']) ? new \DateTimeImmutable($data['created_at']) : null;

View File

@ -38,7 +38,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
$model = new self();
$model->items = $complaints;
$model->paging = $data['paging'];

View File

@ -55,7 +55,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
$model = new self();
$model->items = $unsubscribes;
$model->paging = $data['paging'];

View File

@ -27,14 +27,10 @@ class Unsubscribe
public static function create(array $data): self
{
$model = new self();
$model->tags = $data['tags'] ?? [];
$model->address = $data['address'] ?? null;
$model->createdAt = isset($data['created_at']) ? new \DateTimeImmutable($data['created_at']) : null;
if (isset($data['tags'])) {
$model->tags = $data['tags'];
}
return $model;
}

View File

@ -39,7 +39,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
}
$model = new self();
$model->items = $items;
$model->paging = $data['paging'];

View File

@ -27,8 +27,9 @@ final class UpdateResponse implements ApiResponse
public static function create(array $data): self
{
$model = new self();
$model->message = $data['message'] ?? '';
return $model;
}
public function getMessage(): string