public function add($sku, $name, Money $price, Closure $action = null)
    {
        $product = new Product($sku, $name, $price, $this->rate);

        if ($action) {
          $product->action($action);
        }

        $this->products->add($sku, $product);
    }
public function add($sku, $name, Money $price, Closure $action = null)
    {
        $product = new Product($sku, $name, $price, $this->rate);

        if ($action) {
          $product->action($action);
        }

        $this->products->add($sku, $product);
    }
public function add ( $ sku , $ name , Money $ price , Closure $ action = null ) { $ product = new Product ( $ sku , $ name , $ price , $ this -> rate ) ; if ( $ action ) { $ product -> action ( $ action ) ; } $ this -> products -> add ( $ sku , $ product ) ; }
Add a product to the basket

@param string $sku
@param string $name
@param Money $price
@param Closure $action
@return void
Add a product to the basket