Skip to content

Commit 79245d9

Browse files
committed
Changed price type from string to float
1 parent a918e82 commit 79245d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Model/AbstractDataLayer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,20 @@ protected function getCurrentCurrencyCode(): string
159159
* Format price
160160
*
161161
* @param float $price
162-
* @return string
162+
* @return float
163163
*/
164-
protected function formatPrice(float $price): string
164+
protected function formatPrice(float $price): float
165165
{
166-
return number_format($price, 2, '.', '');
166+
return (float)number_format($price, 2, '.', '');
167167
}
168168

169169
/**
170170
* Get product price
171171
*
172172
* @param Product $product
173-
* @return string
173+
* @return float
174174
*/
175-
protected function getPrice(Product $product): string
175+
protected function getPrice(Product $product): float
176176
{
177177
$priceInfo = $product->getPriceInfo()->getPrice('final_price')->getAmount();
178178
$price = $priceInfo->getValue();

0 commit comments

Comments
 (0)