Add iterate and getPage methods #31
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 9 warnings
Mutation tests (8.3, highest)
Process completed with exit code 1.
|
Mutation tests (8.3, highest):
src/DataTransferObject/AbstractDataTransferObject.php#L39
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
/**
* @throws \InvalidArgumentException if the value is not a valid date time string
*/
- public static function convertDateTime(null|\DateTimeInterface|string $value) : ?\DateTimeImmutable
+ protected static function convertDateTime(null|\DateTimeInterface|string $value) : ?\DateTimeImmutable
{
if (null === $value || $value instanceof \DateTimeImmutable) {
return $value;
|
Mutation tests (8.3, highest):
src/DataTransferObject/AbstractDataTransferObject.php#L41
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
*/
public static function convertDateTime(null|\DateTimeInterface|string $value) : ?\DateTimeImmutable
{
- if (null === $value || $value instanceof \DateTimeImmutable) {
+ if (null === $value || false) {
return $value;
}
if ($value instanceof \DateTimeInterface) {
|
Mutation tests (8.3, highest):
src/DataTransferObject/AbstractDataTransferObject.php#L45
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if (null === $value || $value instanceof \DateTimeImmutable) {
return $value;
}
- if ($value instanceof \DateTimeInterface) {
+ if (false) {
return \DateTimeImmutable::createFromInterface($value);
}
$res = \DateTimeImmutable::createFromFormat(\DATE_ATOM, $value);
|
Mutation tests (8.3, highest):
src/DataTransferObject/AbstractDataTransferObject.php#L50
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
return \DateTimeImmutable::createFromInterface($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#L66
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#L74
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#L79
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);
}
}
|
Mutation tests (8.3, highest):
src/Parser/WebhookParser.php#L52
Escaped Mutant for Mutator "MatchArmRemoval":
--- Original
+++ New
@@ @@
}
return match ($name) {
Name::StockAdjust => WebhookDataStockAdjust::class,
- Name::PickOrderPacked => WebhookDataPickOrderPacked::class,
default => throw new \InvalidArgumentException(sprintf('The name "%d" is not supported', $name->value)),
};
}
}
|
Mutation tests (8.3, highest):
src/Parser/WebhookParser.php#L52
Escaped Mutant for Mutator "MatchArmRemoval":
--- Original
+++ New
@@ @@
return match ($name) {
Name::StockAdjust => WebhookDataStockAdjust::class,
Name::PickOrderPacked => WebhookDataPickOrderPacked::class,
- default => throw new \InvalidArgumentException(sprintf('The name "%d" is not supported', $name->value)),
};
}
}
|