Code Duplication    Length = 12-12 lines in 2 locations

src/Darryldecode/Cart/Cart.php 2 locations

@@ 286-297 (lines=12) @@
283
     *
284
     * @param $id
285
     */
286
    public function remove($id)
287
    {
288
        $cart = $this->getContent();
289
290
        $this->events->fire($this->getInstanceName().'.removing', array($id, $this));
291
292
        $cart->forget($id);
293
294
        $this->save($cart);
295
296
        $this->events->fire($this->getInstanceName().'.removed', array($id, $this));
297
    }
298
299
    /**
300
     * clear cart
@@ 641-652 (lines=12) @@
638
     * @param $id
639
     * @param $item
640
     */
641
    protected function addRow($id, $item)
642
    {
643
        $this->events->fire($this->getInstanceName().'.adding', array($item, $this));
644
645
        $cart = $this->getContent();
646
647
        $cart->put($id, new ItemCollection($item));
648
649
        $this->save($cart);
650
651
        $this->events->fire($this->getInstanceName().'.added', array($item, $this));
652
    }
653
654
    /**
655
     * save the cart