From 7d8ecc1ec85b0f3f9d79edfae3ceefc031ad5e35 Mon Sep 17 00:00:00 2001 From: mandan2 Date: Tue, 26 Sep 2023 16:45:31 +0300 Subject: [PATCH] phpstan --- src/Adapter/Context.php | 1 + subscription/Presenter/OrderDetailPresenter.php | 5 ++--- .../subscription/customerRecurringOrderDetailProduct.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Adapter/Context.php b/src/Adapter/Context.php index 27629cad5..5aec66c47 100644 --- a/src/Adapter/Context.php +++ b/src/Adapter/Context.php @@ -135,6 +135,7 @@ public function formatPrice(float $price, string $isoCode): string { $locale = PrestashopContext::getContext()->getCurrentLocale(); + /* @phpstan-ignore-next-line */ if (!$locale) { return (string) $price; } diff --git a/subscription/Presenter/OrderDetailPresenter.php b/subscription/Presenter/OrderDetailPresenter.php index 466689f47..9d02c0d9e 100644 --- a/subscription/Presenter/OrderDetailPresenter.php +++ b/subscription/Presenter/OrderDetailPresenter.php @@ -85,9 +85,8 @@ public function present( throw CouldNotPresentOrderDetail::failedToFindCurrency(); } - $linkRewrite = is_array($product->link_rewrite) && isset($product->link_rewrite[$order->id_lang]) - ? $product->link_rewrite[$order->id_lang] - : $product->link_rewrite; + /* @phpstan-ignore-next-line */ + $linkRewrite = $product->link_rewrite[$order->id_lang] ?? $product->link_rewrite; $image = $this->productRepository->getCombinationImageById((int) $recurringProduct->id_product_attribute, (int) $order->id_lang); diff --git a/views/templates/front/subscription/customerRecurringOrderDetailProduct.tpl b/views/templates/front/subscription/customerRecurringOrderDetailProduct.tpl index 167253d1b..1d071ee68 100644 --- a/views/templates/front/subscription/customerRecurringOrderDetailProduct.tpl +++ b/views/templates/front/subscription/customerRecurringOrderDetailProduct.tpl @@ -9,7 +9,7 @@

{l s='Product:' mod='mollie'} {$order.name}

-

{$order.quantity}

+

{l s='Quantity:' mod='mollie'} {$order.quantity}

{l s='Unit price:' mod='mollie'} {$order.unit_price}