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

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