Squashed commit message
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
This commit is contained in:
35
backend/src/app/DTO/Settings/MetricsDTO.php
Executable file
35
backend/src/app/DTO/Settings/MetricsDTO.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\DTO\Settings;
|
||||
|
||||
final class MetricsDTO
|
||||
{
|
||||
private bool $yandexMetrikaEnabled;
|
||||
private string $yandexMetrikaCounter;
|
||||
|
||||
public function __construct(
|
||||
bool $yandexMetrikaEnabled,
|
||||
string $yandexMetrikaCounter
|
||||
) {
|
||||
$this->yandexMetrikaEnabled = $yandexMetrikaEnabled;
|
||||
$this->yandexMetrikaCounter = $yandexMetrikaCounter;
|
||||
}
|
||||
|
||||
public function isYandexMetrikaEnabled(): bool
|
||||
{
|
||||
return $this->yandexMetrikaEnabled;
|
||||
}
|
||||
|
||||
public function getYandexMetrikaCounter(): string
|
||||
{
|
||||
return $this->yandexMetrikaCounter;
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'yandex_metrika_enabled' => $this->yandexMetrikaEnabled,
|
||||
'yandex_metrika_counter' => $this->yandexMetrikaCounter,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user