From 7f79a66dd84e1d18b3d9c26e61d8bbfe9fbe5662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20PLANCHAT?= Date: Fri, 23 Jun 2023 11:37:22 +0200 Subject: [PATCH] Apply suggestions from code review --- src/WithSimpleOption.php | 2 +- src/WithValue.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WithSimpleOption.php b/src/WithSimpleOption.php index d18e4ce..9ee9a67 100644 --- a/src/WithSimpleOption.php +++ b/src/WithSimpleOption.php @@ -38,7 +38,7 @@ private function compile(string $code, string $attribute, string $labels, string /** * @return array|string|null>> */ - private function evaluate(array $context, string $code, string $attribute, array $labels, string|null $locale = null, string|null $scope = null): array + private function evaluate(array $context, string $code, string $attribute, array $labels, string $locale = 'null', string $scope = 'null'): array { return [[ 'locale' => $locale, diff --git a/src/WithValue.php b/src/WithValue.php index 1b5a1d7..d30457e 100644 --- a/src/WithValue.php +++ b/src/WithValue.php @@ -22,7 +22,7 @@ private function compile(string $value, string $locale = 'null', string $scope = return sprintf('([["data" => (%s), "locale" => (%s), "scope" => (%s)]])', $value, $locale, $scope); } - private function evaluate(array $context, string $value, string|null $locale = null, string|null $scope = null): array + private function evaluate(array $context, string $value, string $locale = 'null', string $scope = 'null'): array { return [[ 'locale' => $locale,