Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1023-1030 (lines=8) @@
1020
            }
1021
        }
1022
        try {
1023
            if ($count) {
1024
                $this->entityManager->flush();
1025
                $msg = $this->translator->trans('admin.product.index.bulk_product_status_success_count', [
1026
                    '%count%' => $count,
1027
                    '%status%' => $ProductStatus->getName(),
1028
                ]);
1029
                $this->addSuccess($msg, 'admin');
1030
            }
1031
        } catch (\Exception $e) {
1032
            $this->addError($e->getMessage(), 'admin');
1033
        }

src/Eccube/Controller/Admin/Order/OrderController.php 1 location

@@ 563-570 (lines=8) @@
560
            }
561
        }
562
        try {
563
            if ($count) {
564
                $this->entityManager->flush();
565
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
566
                    '%count%' => $count,
567
                    '%status%' => $OrderStatus->getName(),
568
                ]);
569
                $this->addSuccess($msg, 'admin');
570
            }
571
        } catch (\Exception $e) {
572
            log_error('Bulk order status error', [$e]);
573
            $this->addError('admin.flash.register_failed', 'admin');