From b7447af7db03700b5ebc5ed329a56714f6ec6c8f Mon Sep 17 00:00:00 2001 From: "felix.ruf" Date: Tue, 11 Mar 2025 08:16:42 +0100 Subject: [PATCH] add type to method argument --- src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php b/src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php index e4ca9c683..50c25e583 100644 --- a/src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php +++ b/src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php @@ -109,9 +109,9 @@ private function toPayPalOrder(Order $orderResp): PayPalOrder * * @throws RuntimeException */ - private function toOrderAmount($purchaseUnits): float + private function toOrderAmount(array $purchaseUnits): float { - if (!is_array($purchaseUnits) || !isset($purchaseUnits[0])) { + if (!isset($purchaseUnits[0])) { throw new RuntimeException('invalid order response; purchase units not found'); } if (!is_object($purchaseUnits[0]->getAmount())) {