mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-18 05:43:15 +03:00
fix cs
This commit is contained in:
parent
ab8324a178
commit
20385fe70c
@ -325,8 +325,8 @@ class Domain extends HttpApi
|
||||
*
|
||||
* @param string $domain name of the domain
|
||||
*
|
||||
* @param string $active
|
||||
* @return UpdateClickTrackingResponse|array|ResponseInterface
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function updateClickTracking(string $domain, string $active)
|
||||
@ -348,7 +348,7 @@ class Domain extends HttpApi
|
||||
* Updates a domain open tracking settings.
|
||||
*
|
||||
* @param string $domain name of the domain
|
||||
* @param bool $active
|
||||
* @param bool $active
|
||||
*
|
||||
* @return UpdateOpenTrackingResponse|array|ResponseInterface
|
||||
*/
|
||||
@ -370,10 +370,9 @@ class Domain extends HttpApi
|
||||
/**
|
||||
* Updates a domain unsubscribe tracking settings.
|
||||
*
|
||||
* @param string $domain name of the domain
|
||||
* @param string $active
|
||||
* @param string $htmlFooter
|
||||
* @param string $domain name of the domain
|
||||
* @param string|null $textFooter
|
||||
*
|
||||
* @return UpdateUnsubscribeTrackingResponse|array|ResponseInterface
|
||||
*/
|
||||
public function updateUnsubscribeTracking(string $domain, string $active, string $htmlFooter, string $textFooter)
|
||||
@ -385,7 +384,7 @@ class Domain extends HttpApi
|
||||
Assert::nullOrString($textFooter);
|
||||
|
||||
$params = [
|
||||
'active' => (in_array($active, ['yes', 'true'])) ? 'true' : 'false',
|
||||
'active' => (in_array($active, ['yes', 'true'], true)) ? 'true' : 'false',
|
||||
'html_footer' => $htmlFooter,
|
||||
'text_footer' => $textFooter,
|
||||
];
|
||||
|
@ -47,11 +47,11 @@ final class ClickTracking
|
||||
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->getActive() === 'yes';
|
||||
return 'yes' === $this->getActive();
|
||||
}
|
||||
|
||||
public function isHtmlOnly(): bool
|
||||
{
|
||||
return $this->getActive() === 'htmlonly';
|
||||
return 'htmlonly' === $this->getActive();
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,6 @@ final class OpenTracking
|
||||
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->getActive() === 'yes';
|
||||
return 'yes' === $this->getActive();
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ final class UnsubscribeTracking
|
||||
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->active === 'true';
|
||||
return 'yes' === $this->getActive();
|
||||
}
|
||||
|
||||
public function getActive(): string
|
||||
|
@ -44,6 +44,7 @@ JSON;
|
||||
$this->assertInstanceOf(ClickTracking::class, $model->getClick());
|
||||
$this->assertEquals('htmlonly', $model->getClick()->getActive());
|
||||
$this->assertFalse($model->getClick()->isActive());
|
||||
$this->assertTrue($model->getClick()->isHtmlOnly());
|
||||
|
||||
$this->assertNotEmpty($model->getOpen());
|
||||
$this->assertInstanceOf(OpenTracking::class, $model->getOpen());
|
||||
|
Loading…
x
Reference in New Issue
Block a user