Skip to content

Commit

Permalink
Remove addOrderLine method
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Jun 6, 2024
1 parent 2310ea5 commit d4bf40b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/DataTransferObject/SalesOrder/SalesOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ final class SalesOrder extends AbstractDataTransferObject

public ?PickAgainReason $pickAgainReason;

/** @var list<SalesOrderLine> */
public array $orderLines = [];

/**
* @param list<SalesOrderLine> $orderLines
*/
Expand Down Expand Up @@ -84,7 +81,8 @@ public function __construct(
public ?Address $senderAddress = null,
public ?string $sendWithOrder = null,
public bool $generateAndPrintDeliveryNote = false,

Check warning on line 83 in src/DataTransferObject/SalesOrder/SalesOrder.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.3, highest)

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ public ?Address $shippingAddress = null, public ?Address $senderAddress = null, public ?string $sendWithOrder = null, - public bool $generateAndPrintDeliveryNote = false, + public bool $generateAndPrintDeliveryNote = true, /** @var list<SalesOrderLine> $orderLines */ public array $orderLines = [] )
array $orderLines = [],
/** @var list<SalesOrderLine> $orderLines */
public array $orderLines = [],
) {
$this->orderId = (string) $orderId;
$this->orderNumber = (string) $orderNumber;

Check warning on line 88 in src/DataTransferObject/SalesOrder/SalesOrder.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.3, highest)

Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ ) { $this->orderId = (string) $orderId; - $this->orderNumber = (string) $orderNumber; + $this->orderNumber = $orderNumber; $this->orderDateTime = self::convertDateTime($orderDateTime); $this->requestedDeliveryDate = self::convertDateTime($requestedDeliveryDate); $this->state = self::convertEnum($state, State::class);
Expand All @@ -94,16 +92,5 @@ public function __construct(
$this->onHoldReason = self::convertEnum($onHoldReason, OnHoldReason::class);
$this->paymentStatus = self::convertEnum($paymentStatus, PaymentStatus::class);
$this->pickAgainReason = self::convertEnum($pickAgainReason, PickAgainReason::class);

foreach ($orderLines as $orderLine) {
$this->addOrderLine($orderLine);
}
}

public function addOrderLine(SalesOrderLine $orderLine): self
{
$this->orderLines[] = $orderLine;

return $this;
}
}

0 comments on commit d4bf40b

Please sign in to comment.