Code Duplication    Length = 17-20 lines in 2 locations

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

@@ 86-105 (lines=20) @@
83
     * @Route("/{_admin}/setting/shop/payment", name="admin_setting_shop_payment")
84
     * @Template("Setting/Shop/payment.twig")
85
     */
86
    public function index(Application $app, Request $request)
87
    {
88
        $Payments = $this->paymentRepository
89
            ->findBy(
90
                array(),
91
                array('sort_no' => 'DESC')
92
            );
93
94
        $event = new EventArgs(
95
            array(
96
                'Payments' => $Payments,
97
            ),
98
            $request
99
        );
100
        $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_PAYMENT_INDEX_COMPLETE, $event);
101
102
        return [
103
            'Payments' => $Payments,
104
        ];
105
    }
106
107
    /**
108
     * @Route("/{_admin}/setting/shop/payment/new", name="admin_setting_shop_payment_new")

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

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