diff --git a/src/Checker/OrderRefundingAvailabilityChecker.php b/src/Checker/OrderRefundingAvailabilityChecker.php index ee99d9ad..05180328 100644 --- a/src/Checker/OrderRefundingAvailabilityChecker.php +++ b/src/Checker/OrderRefundingAvailabilityChecker.php @@ -25,9 +25,12 @@ public function __invoke(string $orderNumber): bool $order = $this->orderRepository->findOneByNumber($orderNumber); Assert::notNull($order); - return in_array($order->getPaymentState(), [ + return + in_array($order->getPaymentState(), [ OrderPaymentStates::STATE_PAID, OrderPaymentStates::STATE_PARTIALLY_REFUNDED, - ]) && $order->getTotal() !== 0; + ], true) && + $order->getTotal() !== 0 + ; } } diff --git a/src/Checker/OrderRefundsListAvailabilityChecker.php b/src/Checker/OrderRefundsListAvailabilityChecker.php index f10c0ae3..d6401385 100644 --- a/src/Checker/OrderRefundsListAvailabilityChecker.php +++ b/src/Checker/OrderRefundsListAvailabilityChecker.php @@ -25,10 +25,13 @@ public function __invoke(string $orderNumber): bool $order = $this->orderRepository->findOneByNumber($orderNumber); Assert::notNull($order); - return in_array($order->getPaymentState(), [ + return + in_array($order->getPaymentState(), [ OrderPaymentStates::STATE_PAID, OrderPaymentStates::STATE_PARTIALLY_REFUNDED, OrderPaymentStates::STATE_REFUNDED, - ]) && $order->getTotal() !== 0; + ], true) && + $order->getTotal() !== 0 + ; } }