diff --git a/src/Model/GiftCard.php b/src/Model/GiftCard.php index 31aef9c1..92c99521 100644 --- a/src/Model/GiftCard.php +++ b/src/Model/GiftCard.php @@ -235,9 +235,17 @@ public function getOrderIdentification(): ?array return null; } + /** @var mixed $orderId */ + $orderId = $order->getId(); + $orderNumber = $order->getNumber(); + + if (null === $orderId || null === $orderNumber) { + return null; + } + return [ - 'id' => $order->getId(), - 'number' => $order->getNumber(), + 'id' => $orderId, + 'number' => $orderNumber, ]; }