Skip to content

Commit 05ceca7

Browse files
author
Kirill Nesmeyanov
committed
Improve context types
1 parent 9bc77b7 commit 05ceca7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Context.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public function isObjectsAsArrays(): bool
5858
return $this->objectsAsArrays ?? self::OBJECTS_AS_ARRAYS_DEFAULT_VALUE;
5959
}
6060

61-
public function merge(?Context $context): static
61+
public function merge(?Context $context): self
6262
{
6363
if ($context === null) {
6464
return $this;
6565
}
6666

67-
return new static(
67+
return new self(
6868
strictTypes: $context->strictTypes ?? $this->strictTypes,
6969
objectsAsArrays: $context->objectsAsArrays ?? $this->objectsAsArrays,
7070
);

src/Context/LocalContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function fromContext(Direction $direction, ?Context $context): sel
3131
}
3232

3333
#[\Override]
34-
public function merge(?Context $context): static
34+
public function merge(?Context $context): self
3535
{
3636
if ($context === null) {
3737
return $this;

0 commit comments

Comments
 (0)