Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 237-241 (lines=5) @@
234
        );
235
        $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_CATEGORY_DELETE_COMPLETE, $event);
236
237
        if ($TargetClassCategory->isVisible()) {
238
            $this->addSuccess(trans('admin.common.to_show_complete', ['%name%' => $TargetClassCategory->getName()]), 'admin');
239
        } else {
240
            $this->addSuccess(trans('admin.common.to_hide_complete', ['%name%' => $TargetClassCategory->getName()]), 'admin');
241
        }
242
243
        return $this->redirectToRoute('admin_product_class_category', ['class_name_id' => $ClassName->getId()]);
244
    }

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

@@ 250-254 (lines=5) @@
247
248
        $this->entityManager->flush();
249
250
        if ($Payment->isVisible()) {
251
            $this->addSuccess(trans('admin.common.to_show_complete', ['%name%' => $Payment->getMethod()]), 'admin');
252
        } else {
253
            $this->addSuccess(trans('admin.common.to_hide_complete', ['%name%' => $Payment->getMethod()]), 'admin');
254
        }
255
256
        return $this->redirectToRoute('admin_setting_shop_payment');
257
    }