Code Duplication    Length = 8-8 lines in 2 locations

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

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

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

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