From 304db395bf1b16d1b8c4db3278f38fcac3f020d1 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Mon, 16 Sep 2024 19:05:38 +0200 Subject: [PATCH] misc: change implicitly nullable parameter types --- 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) {