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
@@ 448-453 (lines=6) @@
445
        // 商品種別に紐づく配送業者を取得
446
        $deliveries = $this->app['eccube.repository.delivery']->getDeliveries($ProductClass->getProductType());
447
448
        if (count($deliveries) == 0) {
449
            // 商品種別が存在しなければエラー
450
            $this->removeProduct($ProductClass->getId());
451
            $this->addError('cart.product.not.producttype', $productName);
452
            throw new CartException('cart.product.not.producttype');
453
        }
454
455
        $this->setCanAddProductType($ProductClass->getProductType());
456