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

@@ 496-503 (lines=8) @@
493
            }
494
        }
495
        try {
496
            if ($count) {
497
                $this->entityManager->flush();
498
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
499
                    '%count%' => $count,
500
                    '%status%' => $OrderStatus->getName(),
501
                ]);
502
                $this->addSuccess($msg, 'admin');
503
            }
504
        } catch (\Exception $e) {
505
            log_error('Bulk order status error', [$e]);
506
            $this->addError('admin.flash.register_failed', 'admin');