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

@@ 578-585 (lines=8) @@
575
            }
576
        }
577
        try {
578
            if ($count) {
579
                $this->entityManager->flush();
580
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
581
                    '%count%' => $count,
582
                    '%status%' => $OrderStatus->getName(),
583
                ]);
584
                $this->addSuccess($msg, 'admin');
585
            }
586
        } catch (\Exception $e) {
587
            log_error('Bulk order status error', [$e]);
588
            $this->addError('admin.flash.register_failed', 'admin');