Update CartItem.php

This commit is contained in:
Patrick
2022-02-05 19:08:55 +01:00
committed by GitHub
parent d9c8e57280
commit 9f9df6a8f0

View File

@@ -228,7 +228,7 @@ class CartItem implements Arrayable, Jsonable
*/
public static function fromBuyable(Buyable $item, int $qty = 1, ?CartItemOptions $options = null) : self
{
$options = $options ?: new CartItemOptions([])
$options = $options ?: new CartItemOptions([]);
return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $qty, $item->getBuyableWeight($options), $options);
}