Code Duplication    Length = 12-12 lines in 2 locations

src/Darryldecode/Cart/Cart.php 2 locations

@@ 319-330 (lines=12) @@
316
     *
317
     * @param $id
318
     */
319
    public function remove($id)
320
    {
321
        $cart = $this->getContent();
322
323
        $this->events->fire($this->getInstanceName().'.removing', array($id, $this));
324
325
        $cart->forget($id);
326
327
        $this->save($cart);
328
329
        $this->events->fire($this->getInstanceName().'.removed', array($id, $this));
330
    }
331
332
    /**
333
     * clear cart
@@ 684-695 (lines=12) @@
681
     * @param $id
682
     * @param $item
683
     */
684
    protected function addRow($id, $item)
685
    {
686
        $this->events->fire($this->getInstanceName().'.adding', array($item, $this));
687
688
        $cart = $this->getContent();
689
690
        $cart->put($id, new ItemCollection($item, $this->config));
691
692
        $this->save($cart);
693
694
        $this->events->fire($this->getInstanceName().'.added', array($item, $this));
695
    }
696
697
    /**
698
     * save the cart