Update Cart.php

This commit is contained in:
Patrick
2022-02-05 17:53:34 +01:00
committed by GitHub
parent 22f7d62c36
commit 321f41dbfd

View File

@@ -117,7 +117,7 @@ class Cart
*
* @return \Gloudemans\Shoppingcart\CartItem
*/
public function add($id, ?string $name = null, $qty = null, ?Money $price = null, $weight = 0, array $options = []): CartItem
public function add($id, ?string $name = null, $qty = 1, ?Money $price = null, $weight = 0, array $options = []): CartItem
{
if ($this->isMulti($id)) {
return array_map(function ($item) {