Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 284-296 (lines=13) @@
281
     * @Method("PUT")
282
     * @Route("/{_admin}/store/plugin/{id}/enable", requirements={"id" = "\d+"}, name="admin_store_plugin_enable")
283
     */
284
    public function enable(Application $app, Plugin $Plugin)
285
    {
286
        $this->isTokenValid($app);
287
288
        if ($Plugin->getEnable() == Constant::ENABLED) {
289
            $app->addError('admin.plugin.already.enable', 'admin');
290
        } else {
291
            $this->pluginService->enable($Plugin);
292
            $app->addSuccess('admin.plugin.enable.complete', 'admin');
293
        }
294
295
        return $app->redirect($app->url('admin_store_plugin'));
296
    }
297
298
    /**
299
     * 対象のプラグインを無効にします。
@@ 304-316 (lines=13) @@
301
     * @Method("PUT")
302
     * @Route("/{_admin}/store/plugin/{id}/disable", requirements={"id" = "\d+"}, name="admin_store_plugin_disable")
303
     */
304
    public function disable(Application $app, Plugin $Plugin)
305
    {
306
        $this->isTokenValid($app);
307
308
        if ($Plugin->getEnable() == Constant::ENABLED) {
309
            $this->pluginService->disable($Plugin);
310
            $app->addSuccess('admin.plugin.disable.complete', 'admin');
311
        } else {
312
            $app->addError('admin.plugin.already.disable', 'admin');
313
        }
314
315
        return $app->redirect($app->url('admin_store_plugin'));
316
    }
317
318
319
    /**