From 8f99f7d4af76fae2bc44732208790542b0d565ef Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 8 Aug 2024 12:40:56 +0200 Subject: [PATCH] Add PHP 8.4 compatibility --- src/Mapper/Tree/Shell.php | 2 +- src/Type/Types/ClassStringType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mapper/Tree/Shell.php b/src/Mapper/Tree/Shell.php index cec31b4d..150083cd 100644 --- a/src/Mapper/Tree/Shell.php +++ b/src/Mapper/Tree/Shell.php @@ -53,7 +53,7 @@ public static function root( return (new self($settings, $type))->withValue($value); } - public function child(string $name, Type $type, Attributes $attributes = null): self + public function child(string $name, Type $type, ?Attributes $attributes = null): self { $instance = new self($this->settings, $type); $instance->name = $name; diff --git a/src/Type/Types/ClassStringType.php b/src/Type/Types/ClassStringType.php index e1404e55..d715d646 100644 --- a/src/Type/Types/ClassStringType.php +++ b/src/Type/Types/ClassStringType.php @@ -27,7 +27,7 @@ final class ClassStringType implements StringType, CompositeType private string $signature; - public function __construct(ObjectType|UnionType $subType = null) + public function __construct(ObjectType|UnionType|null $subType = null) { if ($subType instanceof UnionType) { foreach ($subType->types() as $type) {