Code Duplication    Length = 11-11 lines in 2 locations

src/Eccube/Twig/Extension/CartServiceExtension.php 2 locations

@@ 52-62 (lines=11) @@
49
        return $this->cartService->getCarts();
50
    }
51
52
    public function get_carts_total_price()
53
    {
54
        $Carts = $this->cartService->getCarts();
55
        $totalPrice = array_reduce($Carts, function ($total, Cart $Cart) {
56
            $total += $Cart->getTotalPrice();
57
58
            return $total;
59
        }, 0);
60
61
        return $totalPrice;
62
    }
63
64
    public function get_carts_total_quantity()
65
    {
@@ 64-74 (lines=11) @@
61
        return $totalPrice;
62
    }
63
64
    public function get_carts_total_quantity()
65
    {
66
        $Carts = $this->cartService->getCarts();
67
        $totalQuantity = array_reduce($Carts, function ($total, Cart $Cart) {
68
            $total += $Cart->getTotalQuantity();
69
70
            return $total;
71
        }, 0);
72
73
        return $totalQuantity;
74
    }
75
}
76