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

@@ 532-539 (lines=8) @@
529
            }
530
        }
531
        try {
532
            if ($count) {
533
                $this->entityManager->flush();
534
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
535
                    '%count%' => $count,
536
                    '%status%' => $OrderStatus->getName(),
537
                ]);
538
                $this->addSuccess($msg, 'admin');
539
            }
540
        } catch (\Exception $e) {
541
            log_error('Bulk order status error', [$e]);
542
            $this->addError('admin.flash.register_failed', 'admin');