Code Duplication    Length = 6-6 lines in 2 locations

src/Eccube/Service/CartService.php 2 locations

@@ 279-284 (lines=6) @@
276
        // 商品種別に紐づく配送業者を取得
277
        $deliveries = $this->app['eccube.repository.delivery']->getDeliveries($ProductClass->getProductType());
278
279
        if (count($deliveries) == 0) {
280
            // 商品種別が存在しなければエラー
281
            $this->removeProduct($ProductClass->getId());
282
            $this->addError('cart.product.not.producttype', $productName);
283
            throw new CartException('cart.product.not.producttype');
284
        }
285
286
        $this->setCanAddProductType($ProductClass->getProductType());
287
@@ 406-411 (lines=6) @@
403
        // 商品種別に紐づく配送業者を取得
404
        $deliveries = $this->app['eccube.repository.delivery']->getDeliveries($ProductClass->getProductType());
405
406
        if (count($deliveries) == 0) {
407
            // 商品種別が存在しなければエラー
408
            $this->removeProduct($ProductClass->getId());
409
            $this->addError('cart.product.not.producttype', $productName);
410
            throw new CartException('cart.product.not.producttype');
411
        }
412
413
        $this->setCanAddProductType($ProductClass->getProductType());
414