Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
NotificationGetterTrait | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
3 | |
100.00% |
1 / 1 |
getNonReminderNotificationTypes | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
3 |
1 | <?php |
2 | |
3 | namespace Olz\Command\SendDailyNotificationsCommand; |
4 | |
5 | use Olz\Entity\NotificationSubscription; |
6 | |
7 | trait NotificationGetterTrait { |
8 | /** @return array<string> */ |
9 | protected function getNonReminderNotificationTypes(): array { |
10 | return array_values(array_filter( |
11 | NotificationSubscription::ALL_NOTIFICATION_TYPES, |
12 | function ($notification_type): bool { |
13 | return |
14 | $notification_type !== NotificationSubscription::TYPE_EMAIL_CONFIG_REMINDER |
15 | && $notification_type !== NotificationSubscription::TYPE_TELEGRAM_CONFIG_REMINDER |
16 | && $notification_type !== NotificationSubscription::TYPE_ROLE_REMINDER; |
17 | } |
18 | )); |
19 | } |
20 | } |