mirror of
https://github.com/wearepixel/laravel-cart.git
synced 2026-11-14 13:51:44 +00:00
code cleanup
This commit is contained in:
+1
-1
@@ -569,7 +569,7 @@ public function getSubTotalWithoutConditions($formatted = true)
|
||||
*
|
||||
* @param bool $formatted
|
||||
*/
|
||||
public function getSubTotal($formatted = true): int|float
|
||||
public function getSubTotal($formatted = true): int|float|string
|
||||
{
|
||||
$subTotal = 0.00;
|
||||
// add all the items together with conditions applied
|
||||
|
||||
@@ -78,7 +78,7 @@ public function getAttributes()
|
||||
/**
|
||||
* the value of this the condition
|
||||
*/
|
||||
public function getValue(): int|float
|
||||
public function getValue(): int|float|string
|
||||
{
|
||||
return $this->args['value'];
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public static function formatValue($value, $formatNumber, $config)
|
||||
if ($formatNumber || $config['format_numbers']) {
|
||||
return floatval(number_format($value, $config['decimals'], $config['dec_point'], $config['thousands_sep']));
|
||||
} else {
|
||||
return $value;
|
||||
return floatval($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user