From 383a489eaae92ddf7939449307b7f611a9d89c4c Mon Sep 17 00:00:00 2001 From: Zain Aftab Date: Wed, 1 Jul 2026 16:57:31 +0500 Subject: [PATCH] Change context parameter to nullable type Update the context parameter to allow null values. --- src/Util/StringTranslatingTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util/StringTranslatingTrait.php b/src/Util/StringTranslatingTrait.php index f2d2776..5bd4bee 100644 --- a/src/Util/StringTranslatingTrait.php +++ b/src/Util/StringTranslatingTrait.php @@ -41,12 +41,12 @@ protected function __(string $string, array $args = array(), $context = null): s * @since [*next-version*] * * @param string $string The string to translate. - * @param string $context The context to translate the string in. + * @param ?string $context The context to translate the string in. * * @return string The translated string. * phpcs:disable PSR2.Methods.MethodDeclaration.Underscore */ - protected function _translate(string $string, string $context = null): string + protected function _translate(string $string, ?string $context = null): string { return $string; }