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

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