From e05a3435ba31e1f0fe5b86557d68141c84651a2f Mon Sep 17 00:00:00 2001 From: Juris Valdovskis Date: Sat, 25 Jan 2025 15:51:13 +0200 Subject: [PATCH 1/2] Update Helper.php PHP 8.4 compatible null usage --- src/Helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Helper.php b/src/Helper.php index 06e0ada..e47e4cd 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -219,7 +219,7 @@ public static function snakeCase(string $value, string $delimiter = '_'): string * @param string|null $lastSeparator * @return string */ - public static function join(array $pieces, string $separator, string $lastSeparator = null): string + public static function join(array $pieces, string $separator, ?string $lastSeparator = null): string { if (is_null($lastSeparator)) { $lastSeparator = $separator; @@ -245,7 +245,7 @@ public static function join(array $pieces, string $separator, string $lastSepara * @param string|null $suffix * @return array */ - public static function wraps(array $strings, string $prefix, string $suffix = null): array + public static function wraps(array $strings, string $prefix, ?string $suffix = null): array { if (is_null($suffix)) { $suffix = $prefix; From 6e2ea027c0de6009547501ba5aaff656cb1e5977 Mon Sep 17 00:00:00 2001 From: Juris Valdovskis Date: Sat, 25 Jan 2025 15:52:03 +0200 Subject: [PATCH 2/2] Update Attribute.php php 8.4 null usage --- src/Attribute.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Attribute.php b/src/Attribute.php index ebd7a11..279eb8c 100644 --- a/src/Attribute.php +++ b/src/Attribute.php @@ -211,7 +211,7 @@ public function getKeyIndexes(): array * @param string|null $key * @return mixed */ - public function getValue(string $key = null) + public function getValue(?string $key = null) { if ($key && $this->isArrayAttribute()) { $key = $this->resolveSiblingKey($key);