Code Duplication    Length = 7-7 lines in 2 locations

src/Eccube/Controller/Mypage/DeliveryController.php 1 location

@@ 63-69 (lines=7) @@
60
61
        // 配送先住所最大値判定
62
        // $idが存在する際は、追加処理ではなく、編集の処理ため本ロジックスキップ
63
        if (is_null($id)) {
64
            $addressCurrNum = count($Customer->getCustomerAddresses());
65
            $addressMax = $app['config']['deliv_addr_max'];
66
            if ($addressCurrNum >= $addressMax) {
67
                throw new NotFoundHttpException();
68
            }
69
        }
70
71
        $CustomerAddress = $app['eccube.repository.customer_address']->findOrCreateByCustomerAndId($Customer, $id);
72

src/Eccube/Controller/ShoppingController.php 1 location

@@ 535-541 (lines=7) @@
532
    {
533
        // 配送先住所最大値判定
534
        $Customer = $app->user();
535
        if ($app->isGranted('IS_AUTHENTICATED_FULLY')) {
536
            $addressCurrNum = count($app->user()->getCustomerAddresses());
537
            $addressMax = $app['config']['deliv_addr_max'];
538
            if ($addressCurrNum >= $addressMax) {
539
                throw new NotFoundHttpException();
540
            }
541
        }
542
543
        // カートチェック
544
        if (!$app['eccube.service.cart']->isLocked()) {