Skip to content

Commit

Permalink
fix(SubMapperInterface): Context is now null by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Feb 6, 2024
1 parent aaab4be commit 8093eed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.6.5

* fix(`ObjectToObjectMetadataFactory`): Remove remnants.
* fix(`SubMapperInterface`): Context is now null by default.

## 0.6.4

Expand Down
4 changes: 2 additions & 2 deletions src/SubMapper/Implementation/SubMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
public function map(
object $source,
object|string $target,
?Context $context,
?Context $context = null,
): object {
if (is_object($target)) {
$targetClass = $target::class;
Expand Down Expand Up @@ -81,7 +81,7 @@ public function mapForProperty(
object $source,
string|object $containing,
string $property,
?Context $context,
?Context $context = null,
): mixed {
if (is_object($containing)) {
$containingObject = $containing;
Expand Down
4 changes: 2 additions & 2 deletions src/SubMapper/SubMapperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface SubMapperInterface
public function map(
object $source,
object|string $target,
?Context $context
?Context $context = null
): object;

/**
Expand All @@ -39,7 +39,7 @@ public function mapForProperty(
object $source,
object|string $containing,
string $property,
?Context $context
?Context $context = null
): mixed;

/**
Expand Down

0 comments on commit 8093eed

Please sign in to comment.