Code Duplication    Length = 17-20 lines in 2 locations

src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php 1 location

@@ 56-75 (lines=20) @@
53
     * @Route("/%eccube_admin_route%/setting/shop/payment", name="admin_setting_shop_payment")
54
     * @Template("@admin/Setting/Shop/payment.twig")
55
     */
56
    public function index(Request $request)
57
    {
58
        $Payments = $this->paymentRepository
59
            ->findBy(
60
                [],
61
                ['sort_no' => 'DESC']
62
            );
63
64
        $event = new EventArgs(
65
            [
66
                'Payments' => $Payments,
67
            ],
68
            $request
69
        );
70
        $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_PAYMENT_INDEX_COMPLETE, $event);
71
72
        return [
73
            'Payments' => $Payments,
74
        ];
75
    }
76
77
    /**
78
     * @Route("/%eccube_admin_route%/setting/shop/payment/new", name="admin_setting_shop_payment_new")

src/Eccube/Controller/Admin/Setting/Shop/DeliveryController.php 1 location

@@ 94-110 (lines=17) @@
91
     * @Route("/%eccube_admin_route%/setting/shop/delivery", name="admin_setting_shop_delivery")
92
     * @Template("@admin/Setting/Shop/delivery.twig")
93
     */
94
    public function index(Request $request)
95
    {
96
        $Deliveries = $this->deliveryRepository
97
            ->findBy([], ['sort_no' => 'DESC']);
98
99
        $event = new EventArgs(
100
            [
101
                'Deliveries' => $Deliveries,
102
            ],
103
            $request
104
        );
105
        $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_DELIVERY_INDEX_COMPLETE, $event);
106
107
        return [
108
            'Deliveries' => $Deliveries,
109
        ];
110
    }
111
112
    /**
113
     * @Route("/%eccube_admin_route%/setting/shop/delivery/new", name="admin_setting_shop_delivery_new")