From 00ea95cc8dd5c5de36f5808e81463d0093c80ecb Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Tue, 16 Dec 2025 16:30:18 +0100 Subject: [PATCH] php 8.4 support --- src/PushTemplate.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PushTemplate.php b/src/PushTemplate.php index ed98279..1a76e90 100644 --- a/src/PushTemplate.php +++ b/src/PushTemplate.php @@ -85,7 +85,7 @@ class PushTemplate implements \JsonSerializable * @param string|null $name * @return $this */ - public function sender(string $email, string $name = null): PushTemplate + public function sender(string $email, ?string $name = null): PushTemplate { $this->sender['email'] = $email; @@ -100,7 +100,7 @@ class PushTemplate implements \JsonSerializable * @param string|null $name * @return $this */ - public function replyTo(string $email, string $name = null): PushTemplate + public function replyTo(string $email, ?string $name = null): PushTemplate { $this->replyTo['email'] = $email; @@ -156,7 +156,7 @@ class PushTemplate implements \JsonSerializable * @param string|null $unsubscribe_url * @return $this */ - public function addRecipient(string $email, string $name = null, array $parameters = [], string $unsubscribe_url = null, string $locale = null): PushTemplate + public function addRecipient(string $email, ?string $name = null, array $parameters = [], ?string $unsubscribe_url = null, ?string $locale = null): PushTemplate { $data = [ 'email' => $email @@ -212,7 +212,7 @@ class PushTemplate implements \JsonSerializable * @param $filename * @return $this */ - public function addAttachment($file, $filename = null) + public function addAttachment($file, ?string $filename = null) { $file = is_object($file) && method_exists($file, 'getRealPath') ? $file->getRealPath() : $file; @@ -262,14 +262,14 @@ class PushTemplate implements \JsonSerializable * @param string|null $locale * @return $this */ - public function locale(string $locale = null) + public function locale(?string $locale = null) { $this->locale = $locale; return $this; } - public function unsubscribeUrl($url = null) + public function unsubscribeUrl(?string $url = null) { $this->unsubscribe_url = $url;