Code Duplication    Length = 15-15 lines in 2 locations

src/Eccube/Controller/Admin/Product/ClassNameController.php 1 location

@@ 112-126 (lines=15) @@
109
110
        $status = $app['eccube.repository.class_name']->delete($TargetClassName);
111
112
        if ($status === true) {
113
            log_info('商品規格削除完了', array($id));
114
115
            $event = new EventArgs(
116
                array(
117
                    'TargetClassName' => $TargetClassName,
118
                ),
119
                $request
120
            );
121
            $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_NAME_DELETE_COMPLETE, $event);
122
123
            $app->addSuccess('admin.class_name.delete.complete', 'admin');
124
        } else {
125
            $app->addError('admin.class_name.delete.error', 'admin');
126
        }
127
128
        return $app->redirect($app->url('admin_product_class_name'));
129
    }

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

@@ 301-315 (lines=15) @@
298
        );
299
        $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_MYPAGE_MYPAGE_DELETE_INITIALIZE, $event);
300
301
        if ($Product) {
302
            log_info('お気に入り商品削除開始');
303
304
            $app['eccube.repository.customer_favorite_product']->deleteFavorite($Customer, $Product);
305
306
            $event = new EventArgs(
307
                array(
308
                    'Customer' => $Customer,
309
                    'Product' => $Product,
310
                ), $request
311
            );
312
            $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_MYPAGE_MYPAGE_DELETE_COMPLETE, $event);
313
314
            log_info('お気に入り商品削除完了');
315
        }
316
317
        return $app->redirect($app->url('mypage_favorite'));
318
    }