Remove AbstractDataTransferObject::convertEnum because Valinor handle… #13
build.yaml
on: push
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation tests
Matrix: Static Code Analysis
Matrix: Unit tests
Annotations
1 error and 5 warnings
Mutation tests (8.3, highest)
Process completed with exit code 1.
|
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#L67
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#L75
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#L80
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);
}
}
|