Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 545-552 (lines=8) @@
542
            }
543
        }
544
        try {
545
            if ($count) {
546
                $this->entityManager->flush();
547
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
548
                    '%count%' => $count,
549
                    '%status%' => $OrderStatus->getName(),
550
                ]);
551
                $this->addSuccess($msg, 'admin');
552
            }
553
        } catch (\Exception $e) {
554
            log_error('Bulk order status error', [$e]);
555
            $this->addError('admin.flash.register_failed', 'admin');

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

@@ 1035-1042 (lines=8) @@
1032
            }
1033
        }
1034
        try {
1035
            if ($count) {
1036
                $this->entityManager->flush();
1037
                $msg = $this->translator->trans('admin.product.index.bulk_product_status_success_count', [
1038
                    '%count%' => $count,
1039
                    '%status%' => $ProductStatus->getName(),
1040
                ]);
1041
                $this->addSuccess($msg, 'admin');
1042
            }
1043
        } catch (\Exception $e) {
1044
            $this->addError($e->getMessage(), 'admin');
1045
        }