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

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