Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 42-52 (lines=11) @@
39
        return $this->cartService->getCarts();
40
    }
41
42
    public function get_carts_total_price()
43
    {
44
        $Carts = $this->cartService->getCarts();
45
        $totalPrice = array_reduce($Carts, function ($total, Cart $Cart) {
46
            $total += $Cart->getTotalPrice();
47
48
            return $total;
49
        }, 0);
50
51
        return $totalPrice;
52
    }
53
54
    public function get_carts_total_quantity()
55
    {
@@ 54-64 (lines=11) @@
51
        return $totalPrice;
52
    }
53
54
    public function get_carts_total_quantity()
55
    {
56
        $Carts = $this->cartService->getCarts();
57
        $totalQuantity = array_reduce($Carts, function ($total, Cart $Cart) {
58
            $total += $Cart->getTotalQuantity();
59
60
            return $total;
61
        }, 0);
62
63
        return $totalQuantity;
64
    }
65
}