diff --git a/src/Mapper/Tree/Shell.php b/src/Mapper/Tree/Shell.php index ca87bafe..08b729c3 100644 --- a/src/Mapper/Tree/Shell.php +++ b/src/Mapper/Tree/Shell.php @@ -38,7 +38,7 @@ public static function root(Type $type, mixed $value): self return (new self($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($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) {