Skip to content

Commit b36a05b

Browse files
committed
Fix Psalm error
1 parent b16ec9b commit b36a05b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Calculator/ProductVariantPricesCalculator.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,15 @@ private function getPersistedPrices(ProductVariantInterface $productVariant, arr
9292

9393
private static function getMinimumPrice(ChannelPricingInterface $channelPricing): int
9494
{
95+
$minimumPrice = 0;
96+
9597
if (method_exists($channelPricing, 'getMinimumPrice')) {
96-
return $channelPricing->getMinimumPrice();
98+
$minimumPrice = $channelPricing->getMinimumPrice();
9799
}
98100

99-
return 0;
101+
/** @psalm-suppress RedundantCondition */
102+
Assert::integer($minimumPrice);
103+
104+
return $minimumPrice;
100105
}
101106
}

0 commit comments

Comments
 (0)