From 51f51b3f123dfc744eab960ebfb2ebdd6e2d7152 Mon Sep 17 00:00:00 2001 From: Rafael White Date: Mon, 13 May 2024 15:53:44 -0400 Subject: [PATCH] cast to int --- src/Mapper/Notifications/UserSettings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mapper/Notifications/UserSettings.php b/src/Mapper/Notifications/UserSettings.php index 6f286d0c..2c2d88bc 100644 --- a/src/Mapper/Notifications/UserSettings.php +++ b/src/Mapper/Notifications/UserSettings.php @@ -30,9 +30,9 @@ public function mapToObject($userSettings, $userSettingsDto, array $context = [] $userSettingsDto->name = $userSettings->notification->name; $userSettingsDto->description = $userSettings->notification->description; // $userSettingsDto->is_enabled = $userSettings->is_enabled; - $userSettingsDto->is_mail_enabled = array_key_exists("push",$decodedChannels); - $userSettingsDto->is_push_enabled = array_key_exists("email",$decodedChannels); - $userSettingsDto->is_realtime_enabled = array_key_exists("realtime",$decodedChannels); + $userSettingsDto->is_mail_enabled = (int)array_key_exists("push",$decodedChannels); + $userSettingsDto->is_push_enabled = (int)array_key_exists("email",$decodedChannels); + $userSettingsDto->is_realtime_enabled = (int)array_key_exists("realtime",$decodedChannels); $userSettingsDto->channels = $decodedChannels; return $userSettingsDto;