Skip to content

Commit

Permalink
misc: change implicitly nullable parameter types
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Sep 16, 2024
1 parent 4e0bc8b commit 304db39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Mapper/Tree/Shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Types/ClassStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 304db39

Please sign in to comment.