Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9f5aa323 authored by theronakpatel's avatar theronakpatel
Browse files

refactor: optimize notification and email sending with single loop and improved code structure

- Replace separate sendCloudNotifications() and sendEmails() methods with combined sendNotificationsAndEmails()
- Break down large function into smaller, focused methods following Single Responsibility Principle
- Add prepareCloudNotification() for notification setup
- Add processUsersForNotificationsAndEmails() for main processing loop
- Add sendNotificationToUserIfValid() and sendEmailToUserIfValid() for specific logic
- Add prepareEmailSubject() and prepareEmailMessage() for email content preparation
- Add logNotificationAndEmailSummary() for centralized logging
- Improve performance by eliminating duplicate user list iteration
- Enhance maintainability and testability with smaller, focused functions
- Apply PHP CS Fixer formatting for code standards compliance
parent 17b335e7
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment