Code Duplication    Length = 13-13 lines in 2 locations

src/Eccube/Controller/Admin/Store/PluginController.php 2 locations

@@ 297-309 (lines=13) @@
294
     * @Method("PUT")
295
     * @Route("/{_admin}/store/plugin/{id}/enable", requirements={"id" = "\d+"}, name="admin_store_plugin_enable")
296
     */
297
    public function enable(Application $app, Plugin $Plugin)
298
    {
299
        $this->isTokenValid($app);
300
301
        if ($Plugin->getEnable() == Constant::ENABLED) {
302
            $app->addError('admin.plugin.already.enable', 'admin');
303
        } else {
304
            $this->pluginService->enable($Plugin);
305
            $app->addSuccess('admin.plugin.enable.complete', 'admin');
306
        }
307
308
        return $app->redirect($app->url('admin_store_plugin'));
309
    }
310
311
    /**
312
     * 対象のプラグインを無効にします。
@@ 317-329 (lines=13) @@
314
     * @Method("PUT")
315
     * @Route("/{_admin}/store/plugin/{id}/disable", requirements={"id" = "\d+"}, name="admin_store_plugin_disable")
316
     */
317
    public function disable(Application $app, Plugin $Plugin)
318
    {
319
        $this->isTokenValid($app);
320
321
        if ($Plugin->getEnable() == Constant::ENABLED) {
322
            $this->pluginService->disable($Plugin);
323
            $app->addSuccess('admin.plugin.disable.complete', 'admin');
324
        } else {
325
            $app->addError('admin.plugin.already.disable', 'admin');
326
        }
327
328
        return $app->redirect($app->url('admin_store_plugin'));
329
    }
330
331
332
    /**