public function setQuantity($qty)
    {
        if(empty($qty) || ! is_numeric($qty))
            throw new \InvalidArgumentException('Please supply a valid quantity.');

        $this->qty = $qty;
    }
public function setQuantity($qty)
    {
        if(empty($qty) || ! is_numeric($qty))
            throw new \InvalidArgumentException('Please supply a valid quantity.');

        $this->qty = $qty;
    }
public function setQuantity ( $ qty ) { if ( empty ( $ qty ) || ! is_numeric ( $ qty ) ) throw new \ InvalidArgumentException ( 'Please supply a valid quantity.' ) ; $ this -> qty = $ qty ; }
Set the quantity for this cart item.

@param int|float $qty
Set the quantity for this cart item .