From 9efc70222e92cc3134e607e4fd6152f97c898c26 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 4 May 2025 21:59:38 +0200 Subject: [PATCH] document the array shape of the content option --- .../Bridge/Mercure/MercureOptions.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/MercureOptions.php b/src/Symfony/Component/Notifier/Bridge/Mercure/MercureOptions.php index 4f3f80c0d7649..85a513cee6901 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/MercureOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/MercureOptions.php @@ -22,6 +22,21 @@ final class MercureOptions implements MessageOptionsInterface /** * @param string|string[]|null $topics + * @param array{ + * badge?: string, + * body?: string, + * data?: mixed, + * dir?: 'auto'|'ltr'|'rtl', + * icon?: string, + * image?: string, + * lang?: string, + * renotify?: bool, + * requireInteraction?: bool, + * silent?: bool, + * tag?: string, + * timestamp?: int, + * vibrate?: int|list, + * }|null $content */ public function __construct( string|array|null $topics = null, @@ -62,6 +77,23 @@ public function getRetry(): ?int return $this->retry; } + /** + * @return array{ + * badge?: string, + * body?: string, + * data?: mixed, + * dir?: 'auto'|'ltr'|'rtl', + * icon?: string, + * image?: string, + * lang?: string, + * renotify?: bool, + * requireInteraction?: bool, + * silent?: bool, + * tag?: string, + * timestamp?: int, + * vibrate?: int|list, + * }|null + */ public function getContent(): ?array { return $this->content;