Code Duplication    Length = 8-8 lines in 2 locations

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
        }

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

@@ 454-461 (lines=8) @@
451
            }
452
        }
453
        try {
454
            if ($count) {
455
                $this->entityManager->flush();
456
                $msg = $this->translator->trans('admin.order.index.bulk_order_status_success_count', [
457
                    '%count%' => $count,
458
                    '%status%' => $OrderStatus->getName(),
459
                ]);
460
                $this->addSuccess($msg, 'admin');
461
            }
462
        } catch (\Exception $e) {
463
            log_error('Bulk order status error', [$e]);
464
            $this->addError('admin.flash.register_failed', 'admin');