Skip to content

Commit

Permalink
better to return the ItemOut when adding an Item
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Jun 16, 2024
1 parent 92aa5e6 commit 2153c0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CXml/Builder/OrderRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function addItem(
\DateTimeInterface $requestDeliveryDate = null,
ItemOut $parent = null,
PriceBasisQuantity $priceBasisQuantity = null
): self {
): ItemOut {
$lineNumber = \count($this->items) + 1;

$item = ItemOut::create(
Expand Down Expand Up @@ -218,7 +218,7 @@ public function addItem(
$this->total += ($quantity * $unitPrice);
}

return $this;
return $item;
}

public function addComment(string $value = null, string $type = null, string $lang = null, string $attachmentUrl = null): self
Expand Down

0 comments on commit 2153c0b

Please sign in to comment.