From ad9ff3ffb915205b17155cb9f184b185d20d0be1 Mon Sep 17 00:00:00 2001 From: Malte Buttjer Date: Thu, 8 Aug 2024 14:11:09 +0200 Subject: [PATCH 1/2] Allow Pushok sound payload as sound --- src/ApnMessage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ApnMessage.php b/src/ApnMessage.php index a90fdc0..86a77ef 100644 --- a/src/ApnMessage.php +++ b/src/ApnMessage.php @@ -37,7 +37,7 @@ class ApnMessage /** * The sound of the notification. */ - public ?string $sound = null; + public null|string|\Pushok\Payload\Sound $sound = null; /** * The interruption level of the notification. @@ -199,7 +199,7 @@ public function badge(?int $badge): self /** * Set the sound of the notification. */ - public function sound(?string $sound = 'default'): self + public function sound(null|string|\Pushok\Payload\Sound $sound = 'default'): self { $this->sound = $sound; From dcc55393ad56dff84377ee60bf4d2461c2d93c65 Mon Sep 17 00:00:00 2001 From: Malte Buttjer Date: Thu, 8 Aug 2024 14:21:34 +0200 Subject: [PATCH 2/2] Remove unnecessary qualifier --- src/ApnMessage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ApnMessage.php b/src/ApnMessage.php index 86a77ef..c1f8b22 100644 --- a/src/ApnMessage.php +++ b/src/ApnMessage.php @@ -4,6 +4,7 @@ use DateTime; use Pushok\Client; +use Pushok\Payload\Sound; class ApnMessage { @@ -37,7 +38,7 @@ class ApnMessage /** * The sound of the notification. */ - public null|string|\Pushok\Payload\Sound $sound = null; + public null|string|Sound $sound = null; /** * The interruption level of the notification. @@ -199,7 +200,7 @@ public function badge(?int $badge): self /** * Set the sound of the notification. */ - public function sound(null|string|\Pushok\Payload\Sound $sound = 'default'): self + public function sound(null|string|Sound $sound = 'default'): self { $this->sound = $sound;