Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 105-121 (lines=17) @@
102
     * @param $id
103
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
104
     */
105
    public function delete(Application $app, $id)
106
    {
107
        $this->isTokenValid($app);
108
109
        $TargetTaxRule = $app['eccube.repository.tax_rule']->find($id);
110
        if (!$TargetTaxRule) {
111
            $app->deleteMessage();
112
            return $app->redirect($app->url('admin_setting_shop_tax'));
113
        }
114
115
        if (!$TargetTaxRule->isDefaultTaxRule()) {
116
            $app['eccube.repository.tax_rule']->delete($TargetTaxRule);
117
            $app->addSuccess('admin.shop.tax.delete.complete', 'admin');
118
        }
119
120
        return $app->redirect($app->url('admin_setting_shop_tax'));
121
    }
122
123
    /**
124
     * 軽減税率の有効/無効設定

src/Eccube/Controller/Admin/Store/PluginController.php 1 location

@@ 284-300 (lines=17) @@
281
     * @param Application $app
282
     * @param $id
283
     */
284
    public function uninstall(Application $app, $id)
285
    {
286
        $this->isTokenValid($app);
287
288
        $Plugin = $app['eccube.repository.plugin']->find($id);
289
290
        if (!$Plugin) {
291
            $app->deleteMessage();
292
            return $app->redirect($app->url('admin_store_plugin'));
293
        }
294
295
        $app['eccube.service.plugin']->uninstall($Plugin);
296
297
        $app->addSuccess('admin.plugin.uninstall.complete', 'admin');
298
299
        return $app->redirect($app->url('admin_store_plugin'));
300
    }
301
302
    public function handler(Application $app)
303
    {