Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function getCustomNotifications(array $settings): array |
||
21 | { |
||
22 | if (!isset($settings['notification']['customNotifications']) || |
||
23 | !is_array($settings['notification']['customNotifications']) |
||
24 | ) { |
||
25 | return []; |
||
26 | } |
||
27 | $notifications = []; |
||
28 | foreach ($settings['notification']['customNotifications'] as $notificationKey => $notificationValue) { |
||
29 | $notifications[$notificationKey] = $notificationValue['title'] ?? ''; |
||
30 | } |
||
31 | |||
32 | return $notifications; |
||
33 | } |
||
35 |