From 112e1843fc3f90b2e8b739872a1737123c31b849 Mon Sep 17 00:00:00 2001 From: Marcin Lewandowski Date: Wed, 25 Dec 2024 11:00:15 +0100 Subject: [PATCH] Fix the nullable parameter declarations for compatibility with PHP 8.4 --- src/Translator.php | 4 ++-- src/TranslatorInterface.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Translator.php b/src/Translator.php index 880f98d..f496f08 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -72,8 +72,8 @@ public function getLocale(): string public function translate( string|Stringable $id, array $parameters = [], - string $category = null, - string $locale = null + ?string $category = null, + ?string $locale = null ): string { $locale ??= $this->locale; diff --git a/src/TranslatorInterface.php b/src/TranslatorInterface.php index 3a4242b..5adcdc3 100644 --- a/src/TranslatorInterface.php +++ b/src/TranslatorInterface.php @@ -46,8 +46,8 @@ public function getLocale(): string; public function translate( string|Stringable $id, array $parameters = [], - string $category = null, - string $locale = null + ?string $category = null, + ?string $locale = null ): string; /**