Code Duplication    Length = 11-11 lines in 2 locations

src/Eccube/Controller/ShoppingController.php 2 locations

@@ 1124-1134 (lines=11) @@
1121
1122
        // 複数配送時は商品毎でお届け先を設定する為、商品をまとめた数量を設定
1123
        $compItemQuantities = array();
1124
        foreach ($Order->getShippings() as $Shipping) {
1125
            foreach ($Shipping->getShipmentItems() as $ShipmentItem) {
1126
                $itemId = $ShipmentItem->getProductClass()->getId();
1127
                $quantity = $ShipmentItem->getQuantity();
1128
                if (array_key_exists($itemId, $compItemQuantities)) {
1129
                    $compItemQuantities[$itemId] = $compItemQuantities[$itemId] + $quantity;
1130
                } else {
1131
                    $compItemQuantities[$itemId] = $quantity;
1132
                }
1133
            }
1134
        }
1135
1136
        // 商品に紐づく商品情報を取得
1137
        $shipmentItems = array();
@@ 1181-1191 (lines=11) @@
1178
            foreach ($data as $mulitples) {
1179
                /** @var \Eccube\Entity\ShipmentItem $multipleItem */
1180
                $multipleItem = $mulitples->getData();
1181
                foreach ($mulitples as $items) {
1182
                    foreach ($items as $item) {
1183
                        $quantity = $item['quantity']->getData();
1184
                        $itemId = $multipleItem->getProductClass()->getId();
1185
                        if (array_key_exists($itemId, $itemQuantities)) {
1186
                            $itemQuantities[$itemId] = $itemQuantities[$itemId] + $quantity;
1187
                        } else {
1188
                            $itemQuantities[$itemId] = $quantity;
1189
                        }
1190
                    }
1191
                }
1192
            }
1193
1194
            foreach ($compItemQuantities as $key => $value) {