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

@@ 272-288 (lines=17) @@
269
     * @param Application $app
270
     * @param $id
271
     */
272
    public function uninstall(Application $app, $id)
273
    {
274
        $this->isTokenValid($app);
275
276
        $Plugin = $app['eccube.repository.plugin']->find($id);
277
278
        if (!$Plugin) {
279
            $app->deleteMessage();
280
            return $app->redirect($app->url('admin_store_plugin'));
281
        }
282
283
        $app['eccube.service.plugin']->uninstall($Plugin);
284
285
        $app->addSuccess('admin.plugin.uninstall.complete', 'admin');
286
287
        return $app->redirect($app->url('admin_store_plugin'));
288
    }
289
290
    public function handler(Application $app)
291
    {