Skip to content

Commit 6754deb

Browse files
committed
issue-1: loosen setRemovalPoint in ParcelResponse
1 parent c127085 commit 6754deb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Model/Tracking/Response/ParcelResponse.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ public function getRemovalPoint(): ?RemovalPoint
7070
return $this->removalPoint;
7171
}
7272

73-
public function setRemovalPoint(array $removalPoint): ParcelResponse
73+
public function setRemovalPoint(?array $removalPoint): ParcelResponse
7474
{
75-
$this->removalPoint = (new RemovalPoint())->populate($removalPoint);
75+
if (null !== $removalPoint) {
76+
$rp = (new RemovalPoint())->populate($removalPoint);
77+
}
78+
79+
$this->removalPoint = $rp ?? null;
7680

7781
return $this;
7882
}

0 commit comments

Comments
 (0)