Code Duplication    Length = 16-17 lines in 2 locations

src/Eccube/Controller/Admin/Setting/Shop/MailController.php 1 location

@@ 103-119 (lines=17) @@
100
                return $app->redirect($app->url('admin_setting_shop_mail'));
101
            }
102
103
            if ($form->isValid()) {
104
105
                $this->entityManager->flush();
106
107
                $event = new EventArgs(
108
                    array(
109
                        'form' => $form,
110
                        'Mail' => $Mail,
111
                    ),
112
                    $request
113
                );
114
                $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_MAIL_INDEX_COMPLETE, $event);
115
116
                $app->addSuccess('admin.shop.mail.save.complete', 'admin');
117
118
                return $app->redirect($app->url('admin_setting_shop_mail_edit', array('id' => $Mail->getId())));
119
            }
120
        }
121
122
        return [

src/Eccube/Controller/ProductController.php 1 location

@@ 375-390 (lines=16) @@
372
            $this->eventDispatcher->dispatch(EccubeEvents::FRONT_PRODUCT_FAVORITE_ADD_COMPLETE, $event);
373
374
            return $app->redirect($app->url('product_detail', array('id' => $Product->getId())));
375
        } else {
376
            // 非会員の場合、ログイン画面を表示
377
            //  ログイン後の画面遷移先を設定
378
            $app->setLoginTargetPath($app->url('product_add_favorite', array('id' => $Product->getId())));
379
            $this->session->getFlashBag()->set('eccube.add.favorite', true);
380
381
            $event = new EventArgs(
382
                array(
383
                    'Product' => $Product,
384
                ),
385
                $request
386
            );
387
            $this->eventDispatcher->dispatch(EccubeEvents::FRONT_PRODUCT_FAVORITE_ADD_COMPLETE, $event);
388
389
            return $app->redirect($app->url('mypage_login'));
390
        }
391
    }
392
393
    /**