Code Duplication    Length = 8-8 lines in 2 locations

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

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

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

@@ 707-714 (lines=8) @@
704
            }
705
        }
706
        try {
707
            if ($count) {
708
                $this->entityManager->flush();
709
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
710
                    '%count%' => $count,
711
                    '%status%' => $OrderStatus->getName(),
712
                ]);
713
                $this->addSuccess($msg, 'admin');
714
            }
715
        } catch (\Exception $e) {
716
            log_error('Bulk order status error', [$e]);
717
            $this->addError('admin.flash.register_failed', 'admin');