replaced allowed mentions with enum
This commit is contained in:
@@ -26,4 +26,16 @@ enum NotificationEventType: string
|
||||
self::cases(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, self>|null $notificationEventTypes
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public static function values(?array $notificationEventTypes = null): array
|
||||
{
|
||||
return array_map(
|
||||
fn (self $notificationEventType): string => $notificationEventType->value,
|
||||
$notificationEventTypes ?? self::cases(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user