Skip to content

Commit

Permalink
add type to method argument
Browse files Browse the repository at this point in the history
  • Loading branch information
felix.ruf committed Mar 11, 2025
1 parent d0ad642 commit b42c23b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ 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])) {

Check failure on line 114 in src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis

TypeDoesNotContainType

src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php:114:13: TypeDoesNotContainType: Type array<array-key, PaypalServerSdkLib\Models\PurchaseUnit> for $purchaseUnits is always array<array-key, mixed> (see https://psalm.dev/056)

Check failure on line 114 in src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis

TypeDoesNotContainType

src/Mealz/AccountingBundle/Service/PayPal/PayPalService.php:114:13: TypeDoesNotContainType: Type array<array-key, PaypalServerSdkLib\Models\PurchaseUnit> for $purchaseUnits is always array<array-key, mixed> (see https://psalm.dev/056)
throw new RuntimeException('invalid order response; purchase units not found');
Expand Down

0 comments on commit b42c23b

Please sign in to comment.