Code Duplication    Length = 10-10 lines in 2 locations

src/Darryldecode/Cart/Cart.php 2 locations

@@ 542-551 (lines=10) @@
539
     * @param bool $formatted
540
     * @return float
541
     */
542
    public function getSubTotalWithoutConditions($formatted = true)
543
    {
544
        $cart = $this->getContent();
545
546
        $sum = $cart->sum(function ($item) {
547
            return $item->getPriceSum();
548
        });
549
550
        return Helpers::formatValue(floatval($sum), $formatted, $this->config);
551
    }    
552
    
553
    /**
554
     * get cart sub total
@@ 558-567 (lines=10) @@
555
     * @param bool $formatted
556
     * @return float
557
     */
558
    public function getSubTotal($formatted = true)
559
    {
560
        $cart = $this->getContent();
561
562
        $sum = $cart->sum(function ($item) {
563
            return $item->getPriceSumWithConditions(false);
564
        });
565
566
        return Helpers::formatValue(floatval($sum), $formatted, $this->config);
567
    }
568
569
    /**
570
     * the new total in which conditions are already applied