domain tracking implementation fix cs

This commit is contained in:
Artem Bondarenko 2020-10-10 01:22:17 +03:00 committed by David Garcia
parent 2d8283ea29
commit 4f8888daed
7 changed files with 3 additions and 45 deletions

View File

@ -23,7 +23,7 @@ final class ClickTracking
public static function create(array $data): self
{
$model = new self();
$model->active = !!($data['active'] ?? null);
$model->active = (bool) ($data['active'] ?? null);
return $model;
}
@ -32,9 +32,6 @@ final class ClickTracking
{
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;

View File

@ -23,7 +23,7 @@ final class OpenTracking
public static function create(array $data): self
{
$model = new self();
$model->active = !!($data['active'] ?? null);
$model->active = (bool) ($data['active'] ?? null);
return $model;
}
@ -32,9 +32,6 @@ final class OpenTracking
{
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;

View File

@ -42,25 +42,16 @@ final class TrackingResponse implements ApiResponse
{
}
/**
* @return ClickTracking
*/
public function getClick(): ClickTracking
{
return $this->click;
}
/**
* @return OpenTracking
*/
public function getOpen(): OpenTracking
{
return $this->open;
}
/**
* @return UnsubscribeTracking
*/
public function getUnsubscribe(): UnsubscribeTracking
{
return $this->unsubscribe;

View File

@ -25,7 +25,7 @@ final class UnsubscribeTracking
public static function create(array $data): self
{
$model = new self();
$model->active = !!($data['active'] ?? null);
$model->active = (bool) ($data['active'] ?? null);
$model->htmlFooter = $data['html_footer'] ?? '';
$model->textFooter = $data['text_footer'] ?? '';
@ -36,25 +36,16 @@ final class UnsubscribeTracking
{
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;
}
/**
* @return string
*/
public function getHtmlFooter(): string
{
return $this->htmlFooter;
}
/**
* @return string
*/
public function getTextFooter(): string
{
return $this->textFooter;

View File

@ -34,17 +34,11 @@ final class UpdateClickTrackingResponse implements ApiResponse
{
}
/**
* @return string|null
*/
public function getMessage(): ?string
{
return $this->message;
}
/**
* @return ClickTracking
*/
public function getClick(): ClickTracking
{
return $this->click;

View File

@ -34,17 +34,11 @@ final class UpdateOpenTrackingResponse implements ApiResponse
{
}
/**
* @return string|null
*/
public function getMessage(): ?string
{
return $this->message;
}
/**
* @return OpenTracking
*/
public function getOpen(): OpenTracking
{
return $this->open;

View File

@ -34,17 +34,11 @@ final class UpdateUnsubscribeTrackingResponse implements ApiResponse
{
}
/**
* @return string|null
*/
public function getMessage(): ?string
{
return $this->message;
}
/**
* @return UnsubscribeTracking
*/
public function getUnsubscribe(): UnsubscribeTracking
{
return $this->unsubscribe;