Skip to content

Make all properties optional. This way DTOs can be created everywhere… #16

Make all properties optional. This way DTOs can be created everywhere…

Make all properties optional. This way DTOs can be created everywhere… #16

Triggered via push June 13, 2024 08:57
Status Success
Total duration 2m 16s
Artifacts

build.yaml

on: push
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation tests
Matrix: Static Code Analysis
Matrix: Unit tests
Fit to window
Zoom out
Zoom in

Annotations

5 warnings
Mutation tests (8.3, highest): src/DataTransferObject/AbstractDataTransferObject.php#L41
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ */ protected static function convertDateTime(null|\DateTimeImmutable|string $value) : ?\DateTimeImmutable { - if (null === $value || $value instanceof \DateTimeImmutable) { + if (null === $value || false) { return $value; } $res = \DateTimeImmutable::createFromFormat(\DATE_ATOM, $value);
Mutation tests (8.3, highest): src/DataTransferObject/AbstractDataTransferObject.php#L46
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ return $value; } $res = \DateTimeImmutable::createFromFormat(\DATE_ATOM, $value); - if (false === $res) { + if (true === $res) { throw new \InvalidArgumentException(sprintf('The value %s is not a valid date time string based on the format %s', $value, \DATE_ATOM)); } return $res; } }
Mutation tests (8.3, highest): src/DataTransferObject/SalesOrder/SalesOrder.php#L63
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ * Otherwise, PeakWMS will not be able to find and capture the order in the payment integration. */ public ?string $transactionNumber = null, - public bool $giftWrap = false, + public bool $giftWrap = true, public ?string $customerReference = null, public ?PaymentStatus $paymentStatus = null, public ?PickAgainReason $pickAgainReason = null,
Mutation tests (8.3, highest): src/DataTransferObject/SalesOrder/SalesOrder.php#L71
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 = [] )
Mutation tests (8.3, highest): src/DataTransferObject/SalesOrder/SalesOrder.php#L76
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); } }