Skip to content

Commit

Permalink
cast to int
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhite27 committed May 13, 2024
1 parent 5207bdc commit 51f51b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mapper/Notifications/UserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 51f51b3

Please sign in to comment.